Files
uwsgi/runningthread.py
T
roberto@precise64 74a9b1b41d added uwsgi.ready()
2012-04-24 21:50:00 +02:00

18 lines
304 B
Python

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")