def start(unicorn, param): global Worker if Worker: Worker.stop() Worker = AsyncWorker(my_estompe, unicorn, param) unicorn.clear(); Worker.start()
def start(unicorn, param): global Worker if Worker: Worker.stop() Worker = AsyncWorker(my_func, unicorn, float(param)) unicorn.clear() print "starting ", Name Worker.start()
def start_effect_worker(effect_name, args): print 'starting ', effect_name possibles = globals().copy() possibles.update(locals()) method = possibles.get(effect_name) if not method: #raise NotImplementedError("Method %s not implemented" % method_name) method = estompe temp_worker = AsyncWorker(method, args) effect_worker.append(temp_worker) print len(effect_worker), " workers" effect_worker[len(effect_worker) - 1].start()
def set_gif(payload): global payload_worker payload_worker = AsyncWorker(gif, payload) payload_worker.start()
def start(func, value): global Worker if Worker: Worker.stop() Worker = AsyncWorker(autoscan, func, value) Worker.start()