thread/queue bug
Peter Hansen
peter at engcorp.com
Fri Dec 10 18:04:35 EST 2004
phil wrote:
> Uses no locks.
It does use locks implicitly, though, since even just
importing threading will do that, and creating a Queue
does too.
> I am mystified, I have written probably 100,000 lines
> of Python and never seen a thread just lock up and quit
> running. It happens on a Queue() statement so my suspicion
> is a bug. ??
You have the source to Queue.py in your standard library
folder. Why not throw a few more print statements into
its __init__ and see what you learn?
> I have kludged around it by putting all the thread/queue stuff
> in the main program and import the stuff I don't want to
> distribute. But mysteries haunt your dreams, sooo...
> #!/usr/local/bin/python
[snip source]
I cobbled together a "working" version of your code
and ran it just fine, whether imported or run directly.
No lockups. On Windows XP.
Are you by any chance running on a new version of the
Linux kernel, where the threading model has changed?
(Or was it just RedHat 9.0?)
I don't know the details, but I know folks have had trouble
with this and Python... For example, I found this
reference to the issue:
http://groups.google.ca/groups?th=fe9a064ffeb38adc&seekm=bpi438%24qta%2408%241%40news.t-online.com#link2
-Peter
More information about the Python-list
mailing list