Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (18 sloc) 469 Bytes
For helping with concurrent processing
:copyright: (c) 2011 by Jonathan Moss.
from threading import Thread
from functools import wraps
def run_in_thread(f):
Wraps the passed in function in a thread so that it executes asynchronously
def wrapper(*args, **kwargs):
thread = Thread(target=f, args=args, kwargs=kwargs)
return thread
return wrapper
Jump to Line
Something went wrong with that request. Please try again.