示例#1
0
def launch(func, params=[]):
    t1 = stackless.tasklet(func)(*params)
    tasklets[t1] = 'atom://localhost/' + func.__module__ + '/' + func.__name__

    while t1.scheduled:
        stackless.schedule()
        sleep(0.01)  
示例#2
0
def launch(func, params=[]):
    t1 = stackless.tasklet(func)(*params)
    tasklets[t1] = 'atom://localhost/' + func.__module__ + '/' + func.__name__

    while t1.scheduled:
        stackless.schedule()
        sleep(0.01)
示例#3
0
def serve_forever(func, params=[]):
    t1 = stackless.tasklet(func)(*params)
    tasklets[t1] = 'atom://localhost/' + func.__module__ + '/' + func.__name__
    while True:
        stackless.run()
        sleep(0.01)
示例#4
0
def serve_forever(func, params=[]):
    t1 = stackless.tasklet(func)(*params)
    tasklets[t1] = 'atom://localhost/' + func.__module__ + '/' + func.__name__
    while True:
        stackless.run()
        sleep(0.01)