Ticket #5962 defect new
Clock.callLater(0, f) can lead to infinite loop
|Reported by:||exarkun||Owned by:||Saurabh|
Description (last modified by itamar) (diff)
from twisted.internet.task import Clock def f(): c.callLater(0, f) c = Clock() f() c.advance(0) print 'Done'
The expected behavior is that f runs once and then Done is printed and the program exits. Instead, Clock.advance spends forever running and re-running f. This is similar to a bug that the real IReactorTime implementation used to have but that we fixed.