1871
|
1 # Stubs for twisted.internet.task (Python 3)
|
|
2 #
|
|
3
|
|
4 from typing import Any, Optional
|
|
5
|
|
6 __metaclass__ = type
|
|
7
|
|
8 class LoopingCall:
|
|
9 call: Any = ...
|
|
10 running: bool = ...
|
|
11 interval: Any = ...
|
|
12 starttime: Any = ...
|
|
13 f: Any = ...
|
|
14 a: Any = ...
|
|
15 kw: Any = ...
|
|
16 clock: Any = ...
|
|
17 def __init__(self, f: Any, *a: Any, **kw: Any) -> None: ...
|
|
18 @property
|
|
19 def deferred(self): ...
|
|
20 withCount: Any = ...
|
|
21 def start(self, interval: Any, now: bool = ...): ...
|
|
22 def stop(self) -> None: ...
|
|
23 def reset(self) -> None: ...
|
|
24 def __call__(self) -> None: ...
|
|
25
|
|
26 class SchedulerError(Exception): ...
|
|
27 class SchedulerStopped(SchedulerError): ...
|
|
28 class TaskFinished(SchedulerError): ...
|
|
29 class TaskDone(TaskFinished): ...
|
|
30 class TaskStopped(TaskFinished): ...
|
|
31 class TaskFailed(TaskFinished): ...
|
|
32 class NotPaused(SchedulerError): ...
|
|
33
|
|
34 class _Timer:
|
|
35 MAX_SLICE: float = ...
|
|
36 end: Any = ...
|
|
37 def __init__(self) -> None: ...
|
|
38 def __call__(self): ...
|
|
39
|
|
40 class CooperativeTask:
|
|
41 def __init__(self, iterator: Any, cooperator: Any) -> None: ...
|
|
42 def whenDone(self): ...
|
|
43 def pause(self) -> None: ...
|
|
44 def resume(self) -> None: ...
|
|
45 def stop(self) -> None: ...
|
|
46
|
|
47 class Cooperator:
|
|
48 def __init__(self, terminationPredicateFactory: Any = ..., scheduler: Any = ..., started: bool = ...) -> None: ...
|
|
49 def coiterate(self, iterator: Any, doneDeferred: Optional[Any] = ...): ...
|
|
50 def cooperate(self, iterator: Any): ...
|
|
51 def start(self) -> None: ...
|
|
52 def stop(self) -> None: ...
|
|
53 @property
|
|
54 def running(self): ...
|
|
55
|
|
56 def coiterate(iterator: Any): ...
|
|
57
|
|
58 class Clock:
|
|
59 rightNow: float = ...
|
|
60 calls: Any = ...
|
|
61 def __init__(self) -> None: ...
|
|
62 def seconds(self): ...
|
|
63 def callLater(self, when: Any, what: Any, *a: Any, **kw: Any): ...
|
|
64 def getDelayedCalls(self): ...
|
|
65 def advance(self, amount: Any) -> None: ...
|
|
66 def pump(self, timings: Any) -> None: ...
|
|
67
|
|
68 def deferLater(clock: Any, delay: Any, callable: Any, *args: Any, **kw: Any): ...
|
|
69 def react(main: Any, argv: Any = ..., _reactor: Optional[Any] = ...) -> None: ...
|