This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author masher
Recipients jnoller, masher
Date 2009-07-03.16:35:37
SpamBayes Score 1.3244487e-05
Marked as misclassified No
Message-id <1246638941.62.0.598567477173.issue6407@psf.upfronthosting.co.za>
In-reply-to
Content
I have attached a patch. All I did was shift the one line from __init__
to _setup_queues.

That's it.

You could take advantage of the change in the following way:

class BlockingPool(pool.Pool):
    def _setup_queues(self):
        pool.Pool._setup_queues(self)
        self._taskqueue = Queue(3)
        self._inqueue = Queue(3)
        self._quick_put = self._inqueue.put

Because of the design of _handle_tasks thread, you need to cap both
_taskqueue and _inqueue for blocking to work out.

I can't see any potential problems caused by this change, but I have
little experience working with this module so far.
History
Date User Action Args
2009-07-03 16:35:42mashersetrecipients: + masher, jnoller
2009-07-03 16:35:41mashersetmessageid: <1246638941.62.0.598567477173.issue6407@psf.upfronthosting.co.za>
2009-07-03 16:35:40masherlinkissue6407 messages
2009-07-03 16:35:39mashercreate