Package envi :: Module threads
[hide private]
[frames] | no frames]

Source Code for Module envi.threads

 1  '''
 
 2  A couple useful thread related toys...
 
 3  ''' 
 4  
 
 5  import threading 
 6  
 
7 -def firethread(func):
8 ''' 9 A decorator which fires a thread to do the given call. 10 11 NOTE: This means these methods may not return anything 12 and callers may not expect sync behavior! 13 ''' 14 def dothread(*args, **kwargs): 15 thr = threading.Thread(target=func, args=args, kwargs=kwargs) 16 thr.setDaemon(True) 17 thr.start()
18 return dothread 19