On 28/05/10 02:16, Antoine Pitrou wrote:
On Fri, 28 May 2010 02:05:14 +1000
Nick Coghlan<ncogh...@gmail.com>  wrote:

Executors and thread pools are not the same thing.

I might create a thread pool for *anything*. An executor will always
have a specific execution model associated with it (whether it be called
futures, as in this case, or runnables or something else).

I'm sorry, but what is the specific execution model you are talking
about, and how is it different from what you usually do with a thread
pool?  Why would you do something other with a thread pool than running
tasks and (optionally) collecting their results?

Both the execution and communications models may be different. The components may be long-lived state machines, they may be active objects, they may communicate by message passing or by manipulating shared state, who knows. Executors are designed around a model of "go do this and let me know when you're done". A general purpose pool needs to support other execution models, and hence will look different (and is harder to design and write, since it needs to be more flexible).

Cheers,
Nick.

--
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to