thread/queue bug

P

phil

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
pnetx.pyc.

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?
 
P

Peter Hansen

phil said:
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
pnetx.pyc.

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?

A few random thoughts:

1. You haven't provided nearly enough info for anyone
to be able to help much, I suspect.

2. Threading problems can be incredibly complex and race
conditions are frequently next to impossible to troubleshoot,
let alone reproduce reliably.

3. Distributing a .pyc does very little to prevent someone
from getting your source, since it is possible to "decompile"
..pyc files into something fairly closely resembling the
original source.

4. The fact that you have a .pyc file instead of a .py
file very likely has *nothing* to do with any threading
problem you are facing, so I suggest you get past that mental
block and look elsewhere.

5. Sorry I can't be more help. You don't give anyone much
to go on. All that stuff about "Queue(0)" and "listenq"
is pretty much meaningless to us, you know...

-Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top