blob: a4c397246aa4783d51cf4c6686c8ec4ffaf31229 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import time
import stackless
def application(env, start_response):
start_response('200 OK', [('Content-Type', 'text/html')])
for i in range(1, 100000):
yield "<h1>%s at %s</h1>\n" % (i, str(time.time()))
# schedule every 2
if i % 2 == 0:
stackless.schedule()
print "DONE AT %d" % i
|