Changeset 642

Show
Ignore:
Timestamp:
07/22/03 10:52:16 (5 years ago)
Author:
gwm
Message:

*** empty log message ***

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBFoundation/RBFoundation/ThreadTools.py

    r641 r642  
    3333class DispatchThread(threading.Thread): 
    3434    def __init__(self): 
     35        self.workqueue = Queue.Queue(0) 
    3536        self.thread = threading.Thread(None, self._OnThreadExecute) 
    36         self.workqueue = Queue.Queue(0
     37        self.thread.setDaemon(True
    3738 
    3839    def CallLater(self, callable, *args, **kw): 
    3940        self.workqueue.put((callable, args, kw), True) 
     41        if not self.thread.isAlive(): 
     42            self.thread.start() 
    4043 
    4144    def _OnThreadExecute(self):