On Nov 8, 2009, at 6:37 AM, Jeffrey Yasskin wrote:
--- More general points ---

** Java's Futures made a mistake in not supporting work stealing, and
this has caused deadlocks at Google. Specifically, in a bounded-size
thread or process pool, when a task in the pool can wait for work
running in the same pool, you can fill up the pool with tasks that are
waiting for tasks that haven't started running yet. To avoid this,
Future.get() should be able to steal the task it's waiting on out of
the pool's queue and run it immediately.

Hey Jeff,

I understand the deadlock possibilities of the executor model, could you explain your proposal would work?

Would it be some sort of flag on the Future.get method e.g. Future.get(timeout=None, immediate_execution=False)?

Cheers,
Brian
_______________________________________________
stdlib-sig mailing list
stdlib-sig@python.org
http://mail.python.org/mailman/listinfo/stdlib-sig

Reply via email to