bug with Queue in Python 1.5.2
Alexandre Fayolle
alf at leo.logilab.fr
Fri Apr 20 10:44:57 EDT 2001
Hello,
I think I encountered a bug in Queue using python 1.5.2, and I was
wondering if it was still around in python 2.x.
I have a Queue with infinite size that sometimes raises QueueFull
exceptions when I use put_nowait.
The reason is that the fsema lock is acquired before the mutex lock,
and it is possible for instance with 2 threads to have the first one
take fsema and mutex, and then the second one trying to acquire fsema,
and failing immediately (because it's in nowait mode), which causes a
Full Queue exception.
Is this still the case with later releases of Python?
TIA
Alexandre Fayolle
--
http://www.logilab.com
Narval is the first software agent available as free software (GPL).
LOGILAB, Paris (France).
More information about the Python-list
mailing list