New submission from Ask Solem <a...@opera.com>:

This patch adds the `waitforslot` argument to apply_async. If set to `True`, 
apply_async will not return until there is a worker available to process the 
job.

This is implemented by a semaphore that is released by the result handler 
whenever a new result is ready. The semaphore is also released
when the supervisor (worker_handler) finds a worker process that has been
unexpectedly terminated.

This is already in use by Celery 2.0, which ships with its own modified version 
of multiprocessing.pool.

I'm not sure about the name ``waitforslot``, I think I may even hate it, but 
haven't been able to come up with a better name for it yet.

----------
components: Library (Lib)
messages: 110193
nosy: asksol, jnoller
priority: normal
severity: normal
status: open
title: multiprocessing.pool: Proposal: "waitforslot"
versions: Python 2.6, Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9248>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to