Пример #1
0
def start(unicorn, param):
    global Worker
    if Worker:
        Worker.stop()
    Worker = AsyncWorker(my_estompe, unicorn, param)
    unicorn.clear();
    Worker.start() 
Пример #2
0
def start(unicorn, param):
    global Worker
    if Worker:
        Worker.stop()
    Worker = AsyncWorker(my_func, unicorn, float(param))
    unicorn.clear()
    print "starting ", Name
    Worker.start()
Пример #3
0
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()
Пример #4
0
def set_gif(payload):
    global payload_worker
    payload_worker = AsyncWorker(gif, payload)
    payload_worker.start()
Пример #5
0
def start(func, value):
    global Worker
    if Worker:
        Worker.stop()
    Worker = AsyncWorker(autoscan, func, value)
    Worker.start()