Ticket #5962 defect new
Clock.callLater(0, f) can lead to infinite loop
| Reported by: | exarkun | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Keywords: | easy review gsoc |
| Cc: | Branch: | ||
| Author: | Launchpad Bug: |
Description (last modified by itamar) (diff)
Consider:
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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

