2
Fix from Twisted r20480.
4
from twisted.internet.task import Clock
5
from twisted.internet import base
7
def callLater(self, when, what, *a, **kw):
9
Copied from twisted.internet.task.Clock, r20480. Fixes the bug
10
where the wrong DelayedCall would sometimes be returned.
12
dc = base.DelayedCall(self.seconds() + when,
18
self.calls.sort(lambda a, b: cmp(a.getTime(), b.getTime()))
23
Returns whether twisted.internet.task.Clock has the bug that
24
returns the wrong DelayedCall or not.
27
dc1 = clock.callLater(10, lambda: None)
28
dc2 = clock.callLater(1, lambda: None)
36
Insert the fixed callLater method.
38
Clock.callLater = callLater