tim.peters at gmail.com
Mon Jan 3 00:29:30 EST 2005
[phillip.watts at anvilcom.com]
Note that python-bugs-list is a moderated list for use only by
automated reports generated from SourceForge. I'm redirecting the
reply to python-list at python.org.
> I have a very strange bug. A thread in a .pyc stops dead.
> This program has many threads and queues and has worked
> great for months.
> One thread listens for UDP messages from other programs,
> and puts the messages in listenq.
> Procmsgs gets from listenq and for a certain kind of
> message creates another mq = Queue(0).
> I don't wish to distribute the source to pnetx.py
> so I have a short program pnet.py import it, that is
> Then the procmsgs thread dies at the Queue statement.
> But if I run pnetx.py as the main program, all works fine.
> So if pnetx.py or .pyc is imported this thread dies. ???
> I've tried this with 2.3.3 and 2.3.4. Anyone?
Sounds like your module spawns a thread as a side effect of being
imported. Don't do that -- you'll get in deadlock trouble with "the
import lock" if you do (use Google to learn more about that).
More information about the Python-list