Re: Problem with multithreading

2009-06-25 Thread MRAB
Jeffrey Barish wrote: [snip] Lou Pecora wrote: Try putting a flush in after the 2nd print statement in case the output is left in some I/O buffer when the thing terminates. e.g. import sys try: print 'in try" sys.stdout.flush() I was hoping for some suggestions of things

Re: Problem with multithreading

2009-06-25 Thread Jeffrey Barish
Lou Pecora wrote: > In article , > "larudwer" wrote: > >> "Jeffrey Barish" schrieb im Newsbeitrag >> news:mailman.2091.1245902997.8015.python-l...@python.org... >> > Jeffrey Barish wrote: >> > >> >> I have a program that uses multithreading to monitor two loops. When >> >> something happens i

Re: Problem with multithreading

2009-06-25 Thread Lou Pecora
In article , "larudwer" wrote: > "Jeffrey Barish" schrieb im Newsbeitrag > news:mailman.2091.1245902997.8015.python-l...@python.org... > > Jeffrey Barish wrote: > > > >> I have a program that uses multithreading to monitor two loops. When > >> something happens in loop1, it sends a message to

Re: Problem with multithreading

2009-06-25 Thread larudwer
"Jeffrey Barish" schrieb im Newsbeitrag news:mailman.2091.1245902997.8015.python-l...@python.org... > Jeffrey Barish wrote: > >> I have a program that uses multithreading to monitor two loops. When >> something happens in loop1, it sends a message to loop2 to have it >> execute >> a command.

Re: Problem with multithreading

2009-06-24 Thread Scott David Daniels
Jeffrey Barish wrote: Jeffrey Barish wrote: print "about to try" try: print "in try" As I ponder this problem, I am beginning to believe that the problem is not related to multithreading. If the problem were due to a collision between the two threads then timing would matter,

Re: Problem with multithreading

2009-06-24 Thread Jeffrey Barish
Jeffrey Barish wrote: > I have a program that uses multithreading to monitor two loops. When > something happens in loop1, it sends a message to loop2 to have it execute > a command. loop2 might have to return a result. If it does, it puts the > result in a queue. loop1, meanwhile, would have

Re: Problem with multithreading

2009-06-24 Thread Lie Ryan
Jeffrey Barish wrote: > I have a program that uses multithreading to monitor two loops. When > something happens in loop1, it sends a message to loop2 to have it execute > a command. loop2 might have to return a result. If it does, it puts the > result in a queue. loop1, meanwhile, would have b

Problem with multithreading

2009-06-24 Thread Jeffrey Barish
I have a program that uses multithreading to monitor two loops. When something happens in loop1, it sends a message to loop2 to have it execute a command. loop2 might have to return a result. If it does, it puts the result in a queue. loop1, meanwhile, would have blocked waiting for something t