Message17886
Logged In: YES
user_id=115179
Since threads are controlled by __start/__stop so there is
no chance to start already running thread.
For me this is perfectly legal - thread was started and has
been terminated, so why not start it second time ?
Queue blocks on use and cant be released/signaled, when it
is used inside thread so thread is blocked too. On windows
platform process is terminated when all its threads are
terminated too - we have deadlock.
example where program hangs on exit:
import time
import threading
import Queue
thqueue = Queue.Queue()
thevent = threading.Event()
def t():
thevent.set()
item = thqueue.get()
threading.Thread(target=t).start()
while not thevent.isSet():
time.sleep(0.1)
print 'exit'
|
|
Date |
User |
Action |
Args |
2007-08-23 14:16:18 | admin | link | issue793687 messages |
2007-08-23 14:16:18 | admin | create | |
|