예제 #1
0
파일: t0.py 프로젝트: pombredanne/shrike
def thing (x):
    global z
    while 1:
        W ('[%d]' % (z,))
        z += x
        shrike._yield()
    return z
예제 #2
0
파일: t1.py 프로젝트: pombredanne/shrike
def thing1 (c):
    global n
    while c:
        r = random.randint (0, 100)
        n -= r
        c -= 1
        shrike._yield()
    print 'exited thing1'