thread.error: release unlocked lock

John P. Speno speno at net.isc.upenn.edu
Sun Nov 21 10:25:03 EST 2004


In <mailman.6665.1101018083.5135.python-list at python.org> Tim Peters <tim.peters at gmail.com> writes:

>[John]
>> Unbounded queues with non-blocking get/put.

>[Tim]
>That's odd -- non-blocking put doesn't really make sense with an
>unbounded queue, esp. when only one thread does put().  It will work
>anyway, it's just peculiar.

I'll bring this issue into a bug report but I wanted to clarify on
this one issue.

My worker threads used a bare queue.get() with no arguments which does
block. I mistakenly thought the default for the block argument was False
when, in fact, it defaults to True. Sorry about that. I'll modify your
example code accordingly and start testing this asap.

Take care.



More information about the Python-list mailing list