t fraction of a second to execute.)
Jack Orenstein
import sys
import signal
import threading
import datetime
import time
class metronome(threading.Thread):
def __init__(self, interval, function):
threading.Thread.__init__(self)
self.interval = interval
self.func
aiting threads; or I
find some other problem that makes me wonder about the stability of
the threading module. I can post details on the problems I'm seeing,
but I thought it would be good to get general feedback
first. (Googling doesn't turn up any signs of trouble.)
Thanks.
Jack Orenstei
I asked:
I am developing a Python program that submits a command to each node
of a cluster and consumes the stdout and stderr from each. I want all
the processes to run in parallel, so I start a thread for each
node. There could be a lot of output from a node, so I have a thread
reading each stream
ine 26, in ?
time.sleep(1)
KeyboardInterrupt
[EMAIL PROTECTED] osh]$
In this case, thread 1 finishes but thread 2 never runs again. Is
this a known problem? Any ideas for workarounds? Are threads widely
used in Python?
Jack Orenstein
# threadtest.py
import sys
import thread
import time
nThr
Peter Hansen wrote:
> Jack Orenstein wrote:
>
>> I am using Python 2.2.2 on RH9, and just starting to work with Python
>> threads.
>
>
> Is this also the first time you've worked with threads in general,
> or do you have much experience with them in other situ
On my machines (one Py2.4 on WinXP, one Py2.3.4 on RH9.0) I don't
see this behaviour. Across about fifty runs each.
Thanks for trying this.
One thing you might try is experimenting with sys.setcheckinterval(),
just to see what effect it might have, if any.
That does seem to have an impact. At 0, t
'Foo Bar',
author = 'Jack Orenstein',
author_email = '[EMAIL PROTECTED]',
packages = ['', 'xyz'],
scripts = ['bin/foobar']
)
The resulting package has everything in the specified directories, but
ists are ordered in the same way,
then you could walk through the lists in order using a merge procedure,
generating a new list as you go.
After ruling out slow data structures and algorithms, you'll almost
certainly be better off using something built in to Python rather than
c