By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,485 Members | 1,031 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,485 IT Pros & Developers. It's quick & easy.

Threading madness

P: n/a
I am developing a GUI that uses multiple threading.Threads, and Queue.Queues
for communicating between the threads, and threading.Timers for checking the
queues.

Everything works well (runs to completion and exits) on my RedHat7.3 machine,
but it doesn't work (hangs like some thread or queue is blocking)on RH9.
However, when I ssh into the RH9 box from my RH7.3 box, the app runs fine(on
my RH7.3 screen).

Now the madness sets in...if I compile the .py into a .pyc, and then run the
.pyc the app works fine on both machines.

So any ideas on what could be going on here?

Also, what is a good way to implement a repeating timer? e.g.:

import threading
myTimer=threading.Timer(10,foo)
myTimer.start()

def foo():
print "foo"
myTimer.start() --> Assertion, thread already started

I am currently reseting the timer like this:

def bar():
print bar
myTimer=threading.Timer(10,bar)
myTimer.start()

But isn't this a memory leak? What happens to the old myTimer?

TIA,
LGL

Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Lane LiaBraaten wrote:
I am developing a GUI that uses multiple threading.Threads, and
Queue.Queues for communicating between the threads, and threading.Timers
for checking the queues.

Everything works well (runs to completion and exits) on my RedHat7.3
machine, but it doesn't work (hangs like some thread or queue is
blocking)on RH9. However, when I ssh into the RH9 box from my RH7.3 box,
the app runs fine (on my RH7.3 screen).


Apparently, RedHat 9.0 uses new threading model.
From what I've seen on several posts, there is a new environment variable
that forces the old threading behaviour:
LD_ASSUME_KERNEL=2.2.5

With that, you should be able to do a google search on the problem and see,
if this is related to your problem (I really have no idea if there is a
relation)

Stephan


Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.