Ticket #6972: repro.py

File repro.py, 495 bytes (added by Glyph, 5 years ago)

simpler reproduction of the issue

Line 
1from __future__ import print_function
2
3from itertools import count
4import sys
5import twisted
6
7from twisted.internet.utils import getProcessValue as do
8from twisted.internet.task import LoopingCall, react
9
10counter = count()
11
12def batch():
13    print("Tick:", next(counter))
14    for _ in range(80):
15        do("/usr/bin/true")
16
17def start(reactor):
18    print("running twisted", twisted.version,
19          "on python", sys.version)
20    c = LoopingCall(batch)
21    return c.start(1.0)
22
23react(start, [])