incubator-droids-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Javier Puerto <jpue...@gmail.com>
Subject Re: HandlerFactory fails with multithreaded implementation
Date Wed, 02 Dec 2009 17:51:18 GMT
I'm working on a solution for this problem and I think that the best fix
would be to move the HandlerFactory object from CrawlingDroid to
CrawlingWorker. With the cloneable solution, every handler must override the
clone() method and implements the interface Cloneable.
I think that moving the factory to the worker could be the best solution,
because with each thread (worker) you will have a new factory object with
new handlers and you we can to forget about the clone implementation. Also,
the clone solution will create and destroy all handlers for each target
handle in each thread. Opposite, the move fix will take more memory but all
the threads will have it's own handlers.

I have a problem about this fix, I wonder where can be the HandlerFactory
init for the Worker.

What do you think about?

Salu2.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message