summaryrefslogtreecommitdiff
path: root/tests/runningthread.py
blob: dfed522cfb18f63d351b1ef95f4dc36c1de2deb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from threading import Thread
import time
import uwsgi


def mess():
    while True:
        for i in xrange(0, 100):
            if uwsgi.ready():
                uwsgi.signal(17)
            print(i)
            time.sleep(0.1)

t = Thread(target=mess)
t.daemon = True
t.start()

print("thread started")