reactivex 4.1.0__py3-none-any.whl → 5.0.0a2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- reactivex/__init__.py +35 -39
- reactivex/_version.py +1 -1
- reactivex/abc/disposable.py +3 -4
- reactivex/abc/observable.py +13 -6
- reactivex/abc/observer.py +2 -1
- reactivex/abc/periodicscheduler.py +7 -6
- reactivex/abc/scheduler.py +10 -9
- reactivex/abc/subject.py +5 -5
- reactivex/disposable/compositedisposable.py +4 -4
- reactivex/disposable/disposable.py +1 -2
- reactivex/disposable/multipleassignmentdisposable.py +2 -3
- reactivex/disposable/refcountdisposable.py +1 -2
- reactivex/disposable/serialdisposable.py +4 -5
- reactivex/disposable/singleassignmentdisposable.py +3 -4
- reactivex/internal/__init__.py +2 -0
- reactivex/internal/basic.py +2 -2
- reactivex/internal/concurrency.py +2 -1
- reactivex/internal/curry.py +59 -0
- reactivex/internal/exceptions.py +7 -12
- reactivex/internal/priorityqueue.py +2 -2
- reactivex/internal/utils.py +3 -2
- reactivex/notification.py +22 -21
- reactivex/observable/case.py +5 -6
- reactivex/observable/catch.py +3 -2
- reactivex/observable/combinelatest.py +4 -5
- reactivex/observable/concat.py +3 -2
- reactivex/observable/connectableobservable.py +7 -7
- reactivex/observable/defer.py +4 -3
- reactivex/observable/empty.py +3 -4
- reactivex/observable/forkjoin.py +5 -5
- reactivex/observable/fromcallback.py +4 -3
- reactivex/observable/fromfuture.py +2 -2
- reactivex/observable/fromiterable.py +4 -3
- reactivex/observable/generate.py +2 -2
- reactivex/observable/generatewithrelativetime.py +4 -3
- reactivex/observable/groupedobservable.py +4 -4
- reactivex/observable/ifthen.py +3 -2
- reactivex/observable/interval.py +1 -4
- reactivex/observable/marbles.py +18 -17
- reactivex/observable/mixins/__init__.py +32 -0
- reactivex/observable/mixins/combination.py +481 -0
- reactivex/observable/mixins/conditional.py +135 -0
- reactivex/observable/mixins/error_handling.py +130 -0
- reactivex/observable/mixins/filtering.py +1119 -0
- reactivex/observable/mixins/mathematical.py +277 -0
- reactivex/observable/mixins/multicasting.py +306 -0
- reactivex/observable/mixins/testing.py +193 -0
- reactivex/observable/mixins/time_based.py +209 -0
- reactivex/observable/mixins/transformation.py +632 -0
- reactivex/observable/mixins/utility.py +811 -0
- reactivex/observable/mixins/windowing.py +688 -0
- reactivex/observable/never.py +2 -2
- reactivex/observable/observable.py +72 -25
- reactivex/observable/onerrorresumenext.py +7 -6
- reactivex/observable/range.py +6 -6
- reactivex/observable/repeat.py +2 -2
- reactivex/observable/returnvalue.py +6 -5
- reactivex/observable/start.py +3 -2
- reactivex/observable/startasync.py +2 -1
- reactivex/observable/throw.py +3 -3
- reactivex/observable/timer.py +12 -12
- reactivex/observable/toasync.py +3 -2
- reactivex/observable/using.py +5 -4
- reactivex/observable/withlatestfrom.py +4 -5
- reactivex/observable/zip.py +7 -6
- reactivex/observer/autodetachobserver.py +4 -4
- reactivex/observer/observer.py +5 -4
- reactivex/observer/scheduledobserver.py +2 -2
- reactivex/operators/__init__.py +162 -208
- reactivex/operators/_all.py +23 -6
- reactivex/operators/_amb.py +88 -75
- reactivex/operators/_asobservable.py +20 -17
- reactivex/operators/_average.py +48 -45
- reactivex/operators/_buffer.py +81 -35
- reactivex/operators/_bufferwithtime.py +29 -9
- reactivex/operators/_bufferwithtimeorcount.py +27 -8
- reactivex/operators/_catch.py +33 -32
- reactivex/operators/_combinelatest.py +28 -20
- reactivex/operators/_concat.py +16 -13
- reactivex/operators/_contains.py +25 -6
- reactivex/operators/_count.py +24 -8
- reactivex/operators/_debounce.py +141 -138
- reactivex/operators/_defaultifempty.py +45 -42
- reactivex/operators/_delay.py +24 -23
- reactivex/operators/_delaysubscription.py +23 -21
- reactivex/operators/_delaywithmapper.py +10 -11
- reactivex/operators/_dematerialize.py +25 -21
- reactivex/operators/_distinct.py +50 -46
- reactivex/operators/_distinctuntilchanged.py +60 -57
- reactivex/operators/_do.py +123 -116
- reactivex/operators/_dowhile.py +3 -2
- reactivex/operators/_elementatordefault.py +57 -33
- reactivex/operators/_exclusive.py +59 -53
- reactivex/operators/_expand.py +82 -77
- reactivex/operators/_filter.py +63 -68
- reactivex/operators/_finallyaction.py +3 -2
- reactivex/operators/_find.py +49 -32
- reactivex/operators/_first.py +18 -11
- reactivex/operators/_firstordefault.py +5 -4
- reactivex/operators/_flatmap.py +89 -83
- reactivex/operators/_forkjoin.py +23 -18
- reactivex/operators/_groupby.py +27 -6
- reactivex/operators/_groupbyuntil.py +8 -5
- reactivex/operators/_groupjoin.py +7 -6
- reactivex/operators/_ignoreelements.py +20 -15
- reactivex/operators/_isempty.py +15 -4
- reactivex/operators/_join.py +6 -5
- reactivex/operators/_last.py +36 -31
- reactivex/operators/_lastordefault.py +8 -8
- reactivex/operators/_map.py +54 -39
- reactivex/operators/_materialize.py +30 -31
- reactivex/operators/_max.py +18 -11
- reactivex/operators/_maxby.py +5 -5
- reactivex/operators/_merge.py +132 -129
- reactivex/operators/_min.py +16 -10
- reactivex/operators/_minby.py +9 -8
- reactivex/operators/_multicast.py +9 -9
- reactivex/operators/_observeon.py +35 -31
- reactivex/operators/_onerrorresumenext.py +2 -1
- reactivex/operators/_pairwise.py +38 -34
- reactivex/operators/_partition.py +80 -73
- reactivex/operators/_pluck.py +4 -3
- reactivex/operators/_publish.py +36 -21
- reactivex/operators/_publishvalue.py +8 -7
- reactivex/operators/_reduce.py +16 -12
- reactivex/operators/_repeat.py +33 -30
- reactivex/operators/_replay.py +9 -9
- reactivex/operators/_retry.py +12 -10
- reactivex/operators/_sample.py +31 -27
- reactivex/operators/_scan.py +41 -39
- reactivex/operators/_sequenceequal.py +8 -7
- reactivex/operators/_single.py +20 -13
- reactivex/operators/_singleordefault.py +6 -5
- reactivex/operators/_skip.py +35 -32
- reactivex/operators/_skiplast.py +38 -34
- reactivex/operators/_skiplastwithtime.py +5 -4
- reactivex/operators/_skipuntil.py +40 -35
- reactivex/operators/_skipuntilwithtime.py +4 -3
- reactivex/operators/_skipwhile.py +65 -44
- reactivex/operators/_skipwithtime.py +50 -46
- reactivex/operators/_slice.py +58 -53
- reactivex/operators/_some.py +48 -47
- reactivex/operators/_startswith.py +17 -15
- reactivex/operators/_subscribeon.py +44 -41
- reactivex/operators/_sum.py +23 -6
- reactivex/operators/_switchlatest.py +71 -69
- reactivex/operators/_take.py +37 -33
- reactivex/operators/_takelast.py +37 -36
- reactivex/operators/_takelastbuffer.py +38 -37
- reactivex/operators/_takelastwithtime.py +60 -56
- reactivex/operators/_takeuntil.py +33 -32
- reactivex/operators/_takeuntilwithtime.py +42 -39
- reactivex/operators/_takewhile.py +108 -100
- reactivex/operators/_takewithtime.py +46 -41
- reactivex/operators/_throttlefirst.py +52 -45
- reactivex/operators/_timeinterval.py +40 -36
- reactivex/operators/_timeout.py +81 -79
- reactivex/operators/_timeoutwithmapper.py +6 -5
- reactivex/operators/_timestamp.py +24 -22
- reactivex/operators/_todict.py +51 -43
- reactivex/operators/_tofuture.py +24 -15
- reactivex/operators/_toiterable.py +33 -27
- reactivex/operators/_tomarbles.py +5 -5
- reactivex/operators/_toset.py +29 -19
- reactivex/operators/_whiledo.py +2 -1
- reactivex/operators/_window.py +100 -99
- reactivex/operators/_windowwithcount.py +56 -54
- reactivex/operators/_windowwithtime.py +95 -79
- reactivex/operators/_windowwithtimeorcount.py +85 -69
- reactivex/operators/_withlatestfrom.py +13 -9
- reactivex/operators/_zip.py +67 -63
- reactivex/operators/connectable/_refcount.py +4 -3
- reactivex/pipe.py +2 -1
- reactivex/run.py +8 -4
- reactivex/scheduler/catchscheduler.py +11 -10
- reactivex/scheduler/currentthreadscheduler.py +2 -3
- reactivex/scheduler/eventloop/asyncioscheduler.py +7 -6
- reactivex/scheduler/eventloop/asynciothreadsafescheduler.py +12 -14
- reactivex/scheduler/eventloop/eventletscheduler.py +4 -4
- reactivex/scheduler/eventloop/geventscheduler.py +4 -4
- reactivex/scheduler/eventloop/ioloopscheduler.py +4 -4
- reactivex/scheduler/eventloop/twistedscheduler.py +4 -4
- reactivex/scheduler/eventloopscheduler.py +9 -12
- reactivex/scheduler/historicalscheduler.py +1 -2
- reactivex/scheduler/immediatescheduler.py +5 -4
- reactivex/scheduler/mainloop/gtkscheduler.py +6 -7
- reactivex/scheduler/mainloop/pygamescheduler.py +4 -4
- reactivex/scheduler/mainloop/qtscheduler.py +6 -6
- reactivex/scheduler/mainloop/tkinterscheduler.py +4 -4
- reactivex/scheduler/mainloop/wxscheduler.py +7 -7
- reactivex/scheduler/newthreadscheduler.py +6 -8
- reactivex/scheduler/periodicscheduler.py +4 -4
- reactivex/scheduler/scheduleditem.py +4 -4
- reactivex/scheduler/scheduler.py +5 -5
- reactivex/scheduler/threadpoolscheduler.py +3 -3
- reactivex/scheduler/timeoutscheduler.py +5 -4
- reactivex/scheduler/trampoline.py +1 -2
- reactivex/scheduler/trampolinescheduler.py +5 -6
- reactivex/scheduler/virtualtimescheduler.py +4 -4
- reactivex/subject/asyncsubject.py +2 -2
- reactivex/subject/behaviorsubject.py +2 -2
- reactivex/subject/innersubscription.py +2 -2
- reactivex/subject/replaysubject.py +8 -8
- reactivex/subject/subject.py +4 -4
- reactivex/testing/coldobservable.py +5 -5
- reactivex/testing/hotobservable.py +6 -6
- reactivex/testing/marbles.py +21 -20
- reactivex/testing/mockdisposable.py +1 -3
- reactivex/testing/mockobserver.py +2 -2
- reactivex/testing/reactivetest.py +2 -2
- reactivex/testing/recorded.py +1 -1
- reactivex/testing/subscription.py +3 -3
- reactivex/testing/testscheduler.py +13 -12
- reactivex/typing.py +25 -14
- {reactivex-4.1.0.dist-info → reactivex-5.0.0a2.dist-info}/METADATA +59 -26
- reactivex-5.0.0a2.dist-info/RECORD +236 -0
- {reactivex-4.1.0.dist-info → reactivex-5.0.0a2.dist-info}/WHEEL +1 -1
- reactivex-4.1.0.dist-info/RECORD +0 -223
- {reactivex-4.1.0.dist-info → reactivex-5.0.0a2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import threading
|
|
3
3
|
from collections import deque
|
|
4
|
-
from typing import
|
|
4
|
+
from typing import TypeVar
|
|
5
5
|
|
|
6
6
|
from reactivex import abc, typing
|
|
7
7
|
from reactivex.disposable import Disposable
|
|
@@ -23,7 +23,7 @@ class EventLoopScheduler(PeriodicScheduler, abc.DisposableBase):
|
|
|
23
23
|
|
|
24
24
|
def __init__(
|
|
25
25
|
self,
|
|
26
|
-
thread_factory:
|
|
26
|
+
thread_factory: typing.StartableFactory | None = None,
|
|
27
27
|
exit_if_empty: bool = False,
|
|
28
28
|
) -> None:
|
|
29
29
|
super().__init__()
|
|
@@ -32,15 +32,15 @@ class EventLoopScheduler(PeriodicScheduler, abc.DisposableBase):
|
|
|
32
32
|
self._thread_factory: typing.StartableFactory = (
|
|
33
33
|
thread_factory or default_thread_factory
|
|
34
34
|
)
|
|
35
|
-
self._thread:
|
|
35
|
+
self._thread: typing.Startable | None = None
|
|
36
36
|
self._condition = threading.Condition(threading.Lock())
|
|
37
37
|
self._queue: PriorityQueue[ScheduledItem] = PriorityQueue()
|
|
38
|
-
self._ready_list:
|
|
38
|
+
self._ready_list: deque[ScheduledItem] = deque()
|
|
39
39
|
|
|
40
40
|
self._exit_if_empty = exit_if_empty
|
|
41
41
|
|
|
42
42
|
def schedule(
|
|
43
|
-
self, action: typing.ScheduledAction[_TState], state:
|
|
43
|
+
self, action: typing.ScheduledAction[_TState], state: _TState | None = None
|
|
44
44
|
) -> abc.DisposableBase:
|
|
45
45
|
"""Schedules an action to be executed.
|
|
46
46
|
|
|
@@ -59,7 +59,7 @@ class EventLoopScheduler(PeriodicScheduler, abc.DisposableBase):
|
|
|
59
59
|
self,
|
|
60
60
|
duetime: typing.RelativeTime,
|
|
61
61
|
action: typing.ScheduledAction[_TState],
|
|
62
|
-
state:
|
|
62
|
+
state: _TState | None = None,
|
|
63
63
|
) -> abc.DisposableBase:
|
|
64
64
|
"""Schedules an action to be executed after duetime.
|
|
65
65
|
|
|
@@ -80,7 +80,7 @@ class EventLoopScheduler(PeriodicScheduler, abc.DisposableBase):
|
|
|
80
80
|
self,
|
|
81
81
|
duetime: typing.AbsoluteTime,
|
|
82
82
|
action: typing.ScheduledAction[_TState],
|
|
83
|
-
state:
|
|
83
|
+
state: _TState | None = None,
|
|
84
84
|
) -> abc.DisposableBase:
|
|
85
85
|
"""Schedules an action to be executed at duetime.
|
|
86
86
|
|
|
@@ -114,7 +114,7 @@ class EventLoopScheduler(PeriodicScheduler, abc.DisposableBase):
|
|
|
114
114
|
self,
|
|
115
115
|
period: typing.RelativeTime,
|
|
116
116
|
action: typing.ScheduledPeriodicAction[_TState],
|
|
117
|
-
state:
|
|
117
|
+
state: _TState | None = None,
|
|
118
118
|
) -> abc.DisposableBase:
|
|
119
119
|
"""Schedules a periodic piece of work.
|
|
120
120
|
|
|
@@ -154,12 +154,10 @@ class EventLoopScheduler(PeriodicScheduler, abc.DisposableBase):
|
|
|
154
154
|
The loop is suspended/resumed using the condition which gets notified
|
|
155
155
|
by calls to Schedule or calls to dispose."""
|
|
156
156
|
|
|
157
|
-
ready:
|
|
157
|
+
ready: deque[ScheduledItem] = deque()
|
|
158
158
|
|
|
159
159
|
while True:
|
|
160
|
-
|
|
161
160
|
with self._condition:
|
|
162
|
-
|
|
163
161
|
# The notification could be because of a call to dispose. This
|
|
164
162
|
# takes precedence over everything else: We'll exit the loop
|
|
165
163
|
# immediately. Subsequent calls to Schedule won't ever create a
|
|
@@ -188,7 +186,6 @@ class EventLoopScheduler(PeriodicScheduler, abc.DisposableBase):
|
|
|
188
186
|
|
|
189
187
|
# Wait for next cycle, or if we're done let's exit if so configured
|
|
190
188
|
with self._condition:
|
|
191
|
-
|
|
192
189
|
if self._ready_list:
|
|
193
190
|
continue
|
|
194
191
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
|
-
from typing import Optional
|
|
3
2
|
|
|
4
3
|
from .scheduler import UTC_ZERO
|
|
5
4
|
from .virtualtimescheduler import VirtualTimeScheduler
|
|
@@ -9,7 +8,7 @@ class HistoricalScheduler(VirtualTimeScheduler):
|
|
|
9
8
|
"""Provides a virtual time scheduler that uses datetime for absolute time
|
|
10
9
|
and timedelta for relative time."""
|
|
11
10
|
|
|
12
|
-
def __init__(self, initial_clock:
|
|
11
|
+
def __init__(self, initial_clock: datetime | None = None) -> None:
|
|
13
12
|
"""Creates a new historical scheduler with the specified initial clock
|
|
14
13
|
value.
|
|
15
14
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
from collections.abc import MutableMapping
|
|
1
2
|
from threading import Lock
|
|
2
|
-
from typing import
|
|
3
|
+
from typing import TypeVar
|
|
3
4
|
from weakref import WeakKeyDictionary
|
|
4
5
|
|
|
5
6
|
from reactivex import abc, typing
|
|
@@ -35,7 +36,7 @@ class ImmediateScheduler(Scheduler):
|
|
|
35
36
|
return cls.singleton()
|
|
36
37
|
|
|
37
38
|
def schedule(
|
|
38
|
-
self, action: typing.ScheduledAction[_TState], state:
|
|
39
|
+
self, action: typing.ScheduledAction[_TState], state: _TState | None = None
|
|
39
40
|
) -> abc.DisposableBase:
|
|
40
41
|
"""Schedules an action to be executed.
|
|
41
42
|
|
|
@@ -54,7 +55,7 @@ class ImmediateScheduler(Scheduler):
|
|
|
54
55
|
self,
|
|
55
56
|
duetime: typing.RelativeTime,
|
|
56
57
|
action: typing.ScheduledAction[_TState],
|
|
57
|
-
state:
|
|
58
|
+
state: _TState | None = None,
|
|
58
59
|
) -> abc.DisposableBase:
|
|
59
60
|
"""Schedules an action to be executed after duetime.
|
|
60
61
|
|
|
@@ -78,7 +79,7 @@ class ImmediateScheduler(Scheduler):
|
|
|
78
79
|
self,
|
|
79
80
|
duetime: typing.AbsoluteTime,
|
|
80
81
|
action: typing.ScheduledAction[_TState],
|
|
81
|
-
state:
|
|
82
|
+
state: _TState | None = None,
|
|
82
83
|
) -> abc.DisposableBase:
|
|
83
84
|
"""Schedules an action to be executed at duetime.
|
|
84
85
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Any,
|
|
1
|
+
from typing import Any, TypeVar, cast
|
|
2
2
|
|
|
3
3
|
from reactivex import abc, typing
|
|
4
4
|
from reactivex.disposable import (
|
|
@@ -36,10 +36,9 @@ class GtkScheduler(PeriodicScheduler):
|
|
|
36
36
|
self,
|
|
37
37
|
time: typing.AbsoluteOrRelativeTime,
|
|
38
38
|
action: typing.ScheduledSingleOrPeriodicAction[_TState],
|
|
39
|
-
state:
|
|
39
|
+
state: _TState | None = None,
|
|
40
40
|
periodic: bool = False,
|
|
41
41
|
) -> abc.DisposableBase:
|
|
42
|
-
|
|
43
42
|
msecs = max(0, int(self.to_seconds(time) * 1000.0))
|
|
44
43
|
|
|
45
44
|
sad = SingleAssignmentDisposable()
|
|
@@ -69,7 +68,7 @@ class GtkScheduler(PeriodicScheduler):
|
|
|
69
68
|
return CompositeDisposable(sad, Disposable(dispose))
|
|
70
69
|
|
|
71
70
|
def schedule(
|
|
72
|
-
self, action: typing.ScheduledAction[_TState], state:
|
|
71
|
+
self, action: typing.ScheduledAction[_TState], state: _TState | None = None
|
|
73
72
|
) -> abc.DisposableBase:
|
|
74
73
|
"""Schedules an action to be executed.
|
|
75
74
|
|
|
@@ -87,7 +86,7 @@ class GtkScheduler(PeriodicScheduler):
|
|
|
87
86
|
self,
|
|
88
87
|
duetime: typing.RelativeTime,
|
|
89
88
|
action: typing.ScheduledAction[_TState],
|
|
90
|
-
state:
|
|
89
|
+
state: _TState | None = None,
|
|
91
90
|
) -> abc.DisposableBase:
|
|
92
91
|
"""Schedules an action to be executed after duetime.
|
|
93
92
|
|
|
@@ -106,7 +105,7 @@ class GtkScheduler(PeriodicScheduler):
|
|
|
106
105
|
self,
|
|
107
106
|
duetime: typing.AbsoluteTime,
|
|
108
107
|
action: typing.ScheduledAction[_TState],
|
|
109
|
-
state:
|
|
108
|
+
state: _TState | None = None,
|
|
110
109
|
) -> abc.DisposableBase:
|
|
111
110
|
"""Schedules an action to be executed at duetime.
|
|
112
111
|
|
|
@@ -127,7 +126,7 @@ class GtkScheduler(PeriodicScheduler):
|
|
|
127
126
|
self,
|
|
128
127
|
period: typing.RelativeTime,
|
|
129
128
|
action: typing.ScheduledPeriodicAction[_TState],
|
|
130
|
-
state:
|
|
129
|
+
state: _TState | None = None,
|
|
131
130
|
) -> abc.DisposableBase:
|
|
132
131
|
"""Schedules a periodic piece of work to be executed in the loop.
|
|
133
132
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import threading
|
|
3
|
-
from typing import Any,
|
|
3
|
+
from typing import Any, TypeVar
|
|
4
4
|
|
|
5
5
|
from reactivex import abc, typing
|
|
6
6
|
from reactivex.internal import PriorityQueue
|
|
@@ -36,7 +36,7 @@ class PyGameScheduler(PeriodicScheduler):
|
|
|
36
36
|
self._queue: PriorityQueue[ScheduledItem] = PriorityQueue()
|
|
37
37
|
|
|
38
38
|
def schedule(
|
|
39
|
-
self, action: typing.ScheduledAction[_TState], state:
|
|
39
|
+
self, action: typing.ScheduledAction[_TState], state: _TState | None = None
|
|
40
40
|
) -> abc.DisposableBase:
|
|
41
41
|
"""Schedules an action to be executed.
|
|
42
42
|
|
|
@@ -56,7 +56,7 @@ class PyGameScheduler(PeriodicScheduler):
|
|
|
56
56
|
self,
|
|
57
57
|
duetime: typing.RelativeTime,
|
|
58
58
|
action: typing.ScheduledAction[_TState],
|
|
59
|
-
state:
|
|
59
|
+
state: _TState | None = None,
|
|
60
60
|
) -> abc.DisposableBase:
|
|
61
61
|
"""Schedules an action to be executed after duetime.
|
|
62
62
|
Args:
|
|
@@ -76,7 +76,7 @@ class PyGameScheduler(PeriodicScheduler):
|
|
|
76
76
|
self,
|
|
77
77
|
duetime: typing.AbsoluteTime,
|
|
78
78
|
action: typing.ScheduledAction[_TState],
|
|
79
|
-
state:
|
|
79
|
+
state: _TState | None = None,
|
|
80
80
|
) -> abc.DisposableBase:
|
|
81
81
|
"""Schedules an action to be executed at duetime.
|
|
82
82
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from datetime import timedelta
|
|
3
|
-
from typing import Any,
|
|
3
|
+
from typing import Any, TypeVar
|
|
4
4
|
|
|
5
5
|
from reactivex import abc, typing
|
|
6
6
|
from reactivex.disposable import (
|
|
@@ -28,10 +28,10 @@ class QtScheduler(PeriodicScheduler):
|
|
|
28
28
|
"""
|
|
29
29
|
super().__init__()
|
|
30
30
|
self._qtcore = qtcore
|
|
31
|
-
self._periodic_timers:
|
|
31
|
+
self._periodic_timers: set[Any] = set()
|
|
32
32
|
|
|
33
33
|
def schedule(
|
|
34
|
-
self, action: typing.ScheduledAction[_TState], state:
|
|
34
|
+
self, action: typing.ScheduledAction[_TState], state: _TState | None = None
|
|
35
35
|
) -> abc.DisposableBase:
|
|
36
36
|
"""Schedules an action to be executed.
|
|
37
37
|
|
|
@@ -49,7 +49,7 @@ class QtScheduler(PeriodicScheduler):
|
|
|
49
49
|
self,
|
|
50
50
|
duetime: typing.RelativeTime,
|
|
51
51
|
action: typing.ScheduledAction[_TState],
|
|
52
|
-
state:
|
|
52
|
+
state: _TState | None = None,
|
|
53
53
|
) -> abc.DisposableBase:
|
|
54
54
|
"""Schedules an action to be executed after duetime.
|
|
55
55
|
|
|
@@ -85,7 +85,7 @@ class QtScheduler(PeriodicScheduler):
|
|
|
85
85
|
self,
|
|
86
86
|
duetime: typing.AbsoluteTime,
|
|
87
87
|
action: typing.ScheduledAction[_TState],
|
|
88
|
-
state:
|
|
88
|
+
state: _TState | None = None,
|
|
89
89
|
) -> abc.DisposableBase:
|
|
90
90
|
"""Schedules an action to be executed at duetime.
|
|
91
91
|
|
|
@@ -106,7 +106,7 @@ class QtScheduler(PeriodicScheduler):
|
|
|
106
106
|
self,
|
|
107
107
|
period: typing.RelativeTime,
|
|
108
108
|
action: typing.ScheduledPeriodicAction[_TState],
|
|
109
|
-
state:
|
|
109
|
+
state: _TState | None = None,
|
|
110
110
|
) -> abc.DisposableBase:
|
|
111
111
|
"""Schedules a periodic piece of work to be executed in the loop.
|
|
112
112
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Any,
|
|
1
|
+
from typing import Any, TypeVar
|
|
2
2
|
|
|
3
3
|
from reactivex import abc, typing
|
|
4
4
|
from reactivex.disposable import (
|
|
@@ -30,7 +30,7 @@ class TkinterScheduler(PeriodicScheduler):
|
|
|
30
30
|
self._root = root
|
|
31
31
|
|
|
32
32
|
def schedule(
|
|
33
|
-
self, action: typing.ScheduledAction[_TState], state:
|
|
33
|
+
self, action: typing.ScheduledAction[_TState], state: _TState | None = None
|
|
34
34
|
) -> abc.DisposableBase:
|
|
35
35
|
"""Schedules an action to be executed.
|
|
36
36
|
|
|
@@ -49,7 +49,7 @@ class TkinterScheduler(PeriodicScheduler):
|
|
|
49
49
|
self,
|
|
50
50
|
duetime: typing.RelativeTime,
|
|
51
51
|
action: typing.ScheduledAction[_TState],
|
|
52
|
-
state:
|
|
52
|
+
state: _TState | None = None,
|
|
53
53
|
) -> abc.DisposableBase:
|
|
54
54
|
"""Schedules an action to be executed after duetime.
|
|
55
55
|
|
|
@@ -80,7 +80,7 @@ class TkinterScheduler(PeriodicScheduler):
|
|
|
80
80
|
self,
|
|
81
81
|
duetime: typing.AbsoluteTime,
|
|
82
82
|
action: typing.ScheduledAction[_TState],
|
|
83
|
-
state:
|
|
83
|
+
state: _TState | None = None,
|
|
84
84
|
) -> abc.DisposableBase:
|
|
85
85
|
"""Schedules an action to be executed at duetime.
|
|
86
86
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Any,
|
|
2
|
+
from typing import Any, TypeVar, cast
|
|
3
3
|
|
|
4
4
|
from reactivex import abc, typing
|
|
5
5
|
from reactivex.disposable import (
|
|
@@ -39,7 +39,7 @@ class WxScheduler(PeriodicScheduler):
|
|
|
39
39
|
self.callback()
|
|
40
40
|
|
|
41
41
|
self._timer_class = Timer
|
|
42
|
-
self._timers:
|
|
42
|
+
self._timers: set[Timer] = set()
|
|
43
43
|
|
|
44
44
|
def cancel_all(self) -> None:
|
|
45
45
|
"""Cancel all scheduled actions.
|
|
@@ -54,7 +54,7 @@ class WxScheduler(PeriodicScheduler):
|
|
|
54
54
|
self,
|
|
55
55
|
time: typing.AbsoluteOrRelativeTime,
|
|
56
56
|
action: typing.ScheduledSingleOrPeriodicAction[_TState],
|
|
57
|
-
state:
|
|
57
|
+
state: _TState | None = None,
|
|
58
58
|
periodic: bool = False,
|
|
59
59
|
) -> abc.DisposableBase:
|
|
60
60
|
scheduler = self
|
|
@@ -89,7 +89,7 @@ class WxScheduler(PeriodicScheduler):
|
|
|
89
89
|
return CompositeDisposable(sad, Disposable(dispose))
|
|
90
90
|
|
|
91
91
|
def schedule(
|
|
92
|
-
self, action: typing.ScheduledAction[_TState], state:
|
|
92
|
+
self, action: typing.ScheduledAction[_TState], state: _TState | None = None
|
|
93
93
|
) -> abc.DisposableBase:
|
|
94
94
|
"""Schedules an action to be executed.
|
|
95
95
|
|
|
@@ -120,7 +120,7 @@ class WxScheduler(PeriodicScheduler):
|
|
|
120
120
|
self,
|
|
121
121
|
duetime: typing.RelativeTime,
|
|
122
122
|
action: typing.ScheduledAction[_TState],
|
|
123
|
-
state:
|
|
123
|
+
state: _TState | None = None,
|
|
124
124
|
) -> abc.DisposableBase:
|
|
125
125
|
"""Schedules an action to be executed after duetime.
|
|
126
126
|
|
|
@@ -139,7 +139,7 @@ class WxScheduler(PeriodicScheduler):
|
|
|
139
139
|
self,
|
|
140
140
|
duetime: typing.AbsoluteTime,
|
|
141
141
|
action: typing.ScheduledAction[_TState],
|
|
142
|
-
state:
|
|
142
|
+
state: _TState | None = None,
|
|
143
143
|
) -> abc.DisposableBase:
|
|
144
144
|
"""Schedules an action to be executed at duetime.
|
|
145
145
|
|
|
@@ -160,7 +160,7 @@ class WxScheduler(PeriodicScheduler):
|
|
|
160
160
|
self,
|
|
161
161
|
period: typing.RelativeTime,
|
|
162
162
|
action: typing.ScheduledPeriodicAction[_TState],
|
|
163
|
-
state:
|
|
163
|
+
state: _TState | None = None,
|
|
164
164
|
) -> abc.DisposableBase:
|
|
165
165
|
"""Schedules a periodic piece of work to be executed in the loop.
|
|
166
166
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import threading
|
|
3
3
|
from datetime import datetime
|
|
4
|
-
from typing import
|
|
4
|
+
from typing import TypeVar
|
|
5
5
|
|
|
6
6
|
from reactivex import abc, typing
|
|
7
7
|
from reactivex.disposable import Disposable
|
|
@@ -18,16 +18,14 @@ log = logging.getLogger("Rx")
|
|
|
18
18
|
class NewThreadScheduler(PeriodicScheduler):
|
|
19
19
|
"""Creates an object that schedules each unit of work on a separate thread."""
|
|
20
20
|
|
|
21
|
-
def __init__(
|
|
22
|
-
self, thread_factory: Optional[typing.StartableFactory] = None
|
|
23
|
-
) -> None:
|
|
21
|
+
def __init__(self, thread_factory: typing.StartableFactory | None = None) -> None:
|
|
24
22
|
super().__init__()
|
|
25
23
|
self.thread_factory: typing.StartableFactory = (
|
|
26
24
|
thread_factory or default_thread_factory
|
|
27
25
|
)
|
|
28
26
|
|
|
29
27
|
def schedule(
|
|
30
|
-
self, action: typing.ScheduledAction[_TState], state:
|
|
28
|
+
self, action: typing.ScheduledAction[_TState], state: _TState | None = None
|
|
31
29
|
) -> abc.DisposableBase:
|
|
32
30
|
"""Schedules an action to be executed.
|
|
33
31
|
|
|
@@ -49,7 +47,7 @@ class NewThreadScheduler(PeriodicScheduler):
|
|
|
49
47
|
self,
|
|
50
48
|
duetime: typing.RelativeTime,
|
|
51
49
|
action: typing.ScheduledAction[_TState],
|
|
52
|
-
state:
|
|
50
|
+
state: _TState | None = None,
|
|
53
51
|
) -> abc.DisposableBase:
|
|
54
52
|
"""Schedules an action to be executed after duetime.
|
|
55
53
|
|
|
@@ -72,7 +70,7 @@ class NewThreadScheduler(PeriodicScheduler):
|
|
|
72
70
|
self,
|
|
73
71
|
duetime: typing.AbsoluteTime,
|
|
74
72
|
action: typing.ScheduledAction[_TState],
|
|
75
|
-
state:
|
|
73
|
+
state: _TState | None = None,
|
|
76
74
|
) -> abc.DisposableBase:
|
|
77
75
|
"""Schedules an action to be executed at duetime.
|
|
78
76
|
|
|
@@ -93,7 +91,7 @@ class NewThreadScheduler(PeriodicScheduler):
|
|
|
93
91
|
self,
|
|
94
92
|
period: typing.RelativeTime,
|
|
95
93
|
action: typing.ScheduledPeriodicAction[_TState],
|
|
96
|
-
state:
|
|
94
|
+
state: _TState | None = None,
|
|
97
95
|
) -> abc.DisposableBase:
|
|
98
96
|
"""Schedules a periodic piece of work.
|
|
99
97
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import TypeVar
|
|
3
3
|
|
|
4
4
|
from reactivex import abc, typing
|
|
5
5
|
from reactivex.disposable import Disposable, MultipleAssignmentDisposable
|
|
@@ -18,7 +18,7 @@ class PeriodicScheduler(Scheduler, abc.PeriodicSchedulerBase):
|
|
|
18
18
|
self,
|
|
19
19
|
period: typing.RelativeTime,
|
|
20
20
|
action: typing.ScheduledPeriodicAction[_TState],
|
|
21
|
-
state:
|
|
21
|
+
state: _TState | None = None,
|
|
22
22
|
) -> abc.DisposableBase:
|
|
23
23
|
"""Schedules a periodic piece of work.
|
|
24
24
|
|
|
@@ -38,8 +38,8 @@ class PeriodicScheduler(Scheduler, abc.PeriodicSchedulerBase):
|
|
|
38
38
|
seconds: float = self.to_seconds(period)
|
|
39
39
|
|
|
40
40
|
def periodic(
|
|
41
|
-
scheduler: abc.SchedulerBase, state:
|
|
42
|
-
) ->
|
|
41
|
+
scheduler: abc.SchedulerBase, state: _TState | None = None
|
|
42
|
+
) -> Disposable | None:
|
|
43
43
|
if disp.is_disposed:
|
|
44
44
|
return None
|
|
45
45
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any
|
|
3
3
|
|
|
4
4
|
from reactivex import abc
|
|
5
5
|
from reactivex.disposable import SingleAssignmentDisposable
|
|
@@ -7,16 +7,16 @@ from reactivex.disposable import SingleAssignmentDisposable
|
|
|
7
7
|
from .scheduler import Scheduler
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class ScheduledItem
|
|
10
|
+
class ScheduledItem:
|
|
11
11
|
def __init__(
|
|
12
12
|
self,
|
|
13
13
|
scheduler: Scheduler,
|
|
14
|
-
state:
|
|
14
|
+
state: Any | None,
|
|
15
15
|
action: abc.ScheduledAction[Any],
|
|
16
16
|
duetime: datetime,
|
|
17
17
|
) -> None:
|
|
18
18
|
self.scheduler: Scheduler = scheduler
|
|
19
|
-
self.state:
|
|
19
|
+
self.state: Any | None = state
|
|
20
20
|
self.action: abc.ScheduledAction[Any] = action
|
|
21
21
|
self.duetime: datetime = duetime
|
|
22
22
|
self.disposable: SingleAssignmentDisposable = SingleAssignmentDisposable()
|
reactivex/scheduler/scheduler.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from abc import abstractmethod
|
|
2
2
|
from datetime import datetime, timedelta, timezone
|
|
3
|
-
from typing import
|
|
3
|
+
from typing import TypeVar
|
|
4
4
|
|
|
5
5
|
from reactivex import abc, typing
|
|
6
6
|
from reactivex.disposable import Disposable
|
|
@@ -30,7 +30,7 @@ class Scheduler(abc.SchedulerBase):
|
|
|
30
30
|
|
|
31
31
|
@abstractmethod
|
|
32
32
|
def schedule(
|
|
33
|
-
self, action: abc.ScheduledAction[_TState], state:
|
|
33
|
+
self, action: abc.ScheduledAction[_TState], state: _TState | None = None
|
|
34
34
|
) -> abc.DisposableBase:
|
|
35
35
|
"""Schedules an action to be executed.
|
|
36
36
|
|
|
@@ -50,7 +50,7 @@ class Scheduler(abc.SchedulerBase):
|
|
|
50
50
|
self,
|
|
51
51
|
duetime: typing.RelativeTime,
|
|
52
52
|
action: abc.ScheduledAction[_TState],
|
|
53
|
-
state:
|
|
53
|
+
state: _TState | None = None,
|
|
54
54
|
) -> abc.DisposableBase:
|
|
55
55
|
"""Schedules an action to be executed after duetime.
|
|
56
56
|
|
|
@@ -71,7 +71,7 @@ class Scheduler(abc.SchedulerBase):
|
|
|
71
71
|
self,
|
|
72
72
|
duetime: typing.AbsoluteTime,
|
|
73
73
|
action: abc.ScheduledAction[_TState],
|
|
74
|
-
state:
|
|
74
|
+
state: _TState | None = None,
|
|
75
75
|
) -> abc.DisposableBase:
|
|
76
76
|
"""Schedules an action to be executed at duetime.
|
|
77
77
|
|
|
@@ -88,7 +88,7 @@ class Scheduler(abc.SchedulerBase):
|
|
|
88
88
|
return NotImplemented
|
|
89
89
|
|
|
90
90
|
def invoke_action(
|
|
91
|
-
self, action: abc.ScheduledAction[_TState], state:
|
|
91
|
+
self, action: abc.ScheduledAction[_TState], state: _TState | None = None
|
|
92
92
|
) -> abc.DisposableBase:
|
|
93
93
|
"""Invoke the given given action. This is typically called by instances
|
|
94
94
|
of ScheduledItem.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from concurrent.futures import Future, ThreadPoolExecutor
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any
|
|
3
3
|
|
|
4
4
|
from reactivex import abc, typing
|
|
5
5
|
|
|
@@ -17,7 +17,7 @@ class ThreadPoolScheduler(NewThreadScheduler):
|
|
|
17
17
|
):
|
|
18
18
|
self.executor: ThreadPoolExecutor = executor
|
|
19
19
|
self.target: typing.StartableTarget = target
|
|
20
|
-
self.future:
|
|
20
|
+
self.future: Future[Any] | None = None
|
|
21
21
|
|
|
22
22
|
def start(self) -> None:
|
|
23
23
|
self.future = self.executor.submit(self.target)
|
|
@@ -26,7 +26,7 @@ class ThreadPoolScheduler(NewThreadScheduler):
|
|
|
26
26
|
if self.future:
|
|
27
27
|
self.future.cancel()
|
|
28
28
|
|
|
29
|
-
def __init__(self, max_workers:
|
|
29
|
+
def __init__(self, max_workers: int | None = None) -> None:
|
|
30
30
|
self.executor: ThreadPoolExecutor = ThreadPoolExecutor(max_workers=max_workers)
|
|
31
31
|
|
|
32
32
|
def thread_factory(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
from collections.abc import MutableMapping
|
|
1
2
|
from threading import Lock, Timer
|
|
2
|
-
from typing import
|
|
3
|
+
from typing import TypeVar
|
|
3
4
|
from weakref import WeakKeyDictionary
|
|
4
5
|
|
|
5
6
|
from reactivex import abc, typing
|
|
@@ -34,7 +35,7 @@ class TimeoutScheduler(PeriodicScheduler):
|
|
|
34
35
|
return cls.singleton()
|
|
35
36
|
|
|
36
37
|
def schedule(
|
|
37
|
-
self, action: abc.ScheduledAction[_TState], state:
|
|
38
|
+
self, action: abc.ScheduledAction[_TState], state: _TState | None = None
|
|
38
39
|
) -> abc.DisposableBase:
|
|
39
40
|
"""Schedules an action to be executed.
|
|
40
41
|
|
|
@@ -65,7 +66,7 @@ class TimeoutScheduler(PeriodicScheduler):
|
|
|
65
66
|
self,
|
|
66
67
|
duetime: typing.RelativeTime,
|
|
67
68
|
action: abc.ScheduledAction[_TState],
|
|
68
|
-
state:
|
|
69
|
+
state: _TState | None = None,
|
|
69
70
|
) -> abc.DisposableBase:
|
|
70
71
|
"""Schedules an action to be executed after duetime.
|
|
71
72
|
|
|
@@ -101,7 +102,7 @@ class TimeoutScheduler(PeriodicScheduler):
|
|
|
101
102
|
self,
|
|
102
103
|
duetime: typing.AbsoluteTime,
|
|
103
104
|
action: abc.ScheduledAction[_TState],
|
|
104
|
-
state:
|
|
105
|
+
state: _TState | None = None,
|
|
105
106
|
) -> abc.DisposableBase:
|
|
106
107
|
"""Schedules an action to be executed at duetime.
|
|
107
108
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from collections import deque
|
|
2
2
|
from threading import Condition, Lock
|
|
3
|
-
from typing import Deque
|
|
4
3
|
|
|
5
4
|
from reactivex.internal.priorityqueue import PriorityQueue
|
|
6
5
|
|
|
@@ -34,7 +33,7 @@ class Trampoline:
|
|
|
34
33
|
self._queue.clear()
|
|
35
34
|
|
|
36
35
|
def _run(self) -> None:
|
|
37
|
-
ready:
|
|
36
|
+
ready: deque[ScheduledItem] = deque()
|
|
38
37
|
while True:
|
|
39
38
|
with self._lock:
|
|
40
39
|
while len(self._queue) > 0:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import TypeVar
|
|
3
3
|
|
|
4
4
|
from reactivex import abc, typing
|
|
5
5
|
from reactivex.abc.disposable import DisposableBase
|
|
@@ -26,14 +26,13 @@ class TrampolineScheduler(Scheduler):
|
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
def __init__(self) -> None:
|
|
29
|
-
|
|
30
29
|
self._tramp = Trampoline()
|
|
31
30
|
|
|
32
31
|
def get_trampoline(self) -> Trampoline:
|
|
33
32
|
return self._tramp
|
|
34
33
|
|
|
35
34
|
def schedule(
|
|
36
|
-
self, action: abc.ScheduledAction[_TState], state:
|
|
35
|
+
self, action: abc.ScheduledAction[_TState], state: _TState | None = None
|
|
37
36
|
) -> abc.DisposableBase:
|
|
38
37
|
"""Schedules an action to be executed.
|
|
39
38
|
|
|
@@ -52,7 +51,7 @@ class TrampolineScheduler(Scheduler):
|
|
|
52
51
|
self,
|
|
53
52
|
duetime: typing.RelativeTime,
|
|
54
53
|
action: abc.ScheduledAction[_TState],
|
|
55
|
-
state:
|
|
54
|
+
state: _TState | None = None,
|
|
56
55
|
) -> abc.DisposableBase:
|
|
57
56
|
"""Schedules an action to be executed after duetime.
|
|
58
57
|
|
|
@@ -73,7 +72,7 @@ class TrampolineScheduler(Scheduler):
|
|
|
73
72
|
self,
|
|
74
73
|
duetime: typing.AbsoluteTime,
|
|
75
74
|
action: abc.ScheduledAction[_TState],
|
|
76
|
-
state:
|
|
75
|
+
state: _TState | None = None,
|
|
77
76
|
) -> abc.DisposableBase:
|
|
78
77
|
"""Schedules an action to be executed at duetime.
|
|
79
78
|
|
|
@@ -108,7 +107,7 @@ class TrampolineScheduler(Scheduler):
|
|
|
108
107
|
|
|
109
108
|
def ensure_trampoline(
|
|
110
109
|
self, action: ScheduledAction[_TState]
|
|
111
|
-
) ->
|
|
110
|
+
) -> DisposableBase | None:
|
|
112
111
|
"""Method for testing the TrampolineScheduler."""
|
|
113
112
|
|
|
114
113
|
if self.schedule_required():
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import threading
|
|
3
3
|
from datetime import datetime, timedelta
|
|
4
|
-
from typing import Any,
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
5
|
|
|
6
6
|
from reactivex import abc, typing
|
|
7
7
|
from reactivex.abc.scheduler import AbsoluteTime
|
|
@@ -54,7 +54,7 @@ class VirtualTimeScheduler(PeriodicScheduler):
|
|
|
54
54
|
return self.to_datetime(self._clock)
|
|
55
55
|
|
|
56
56
|
def schedule(
|
|
57
|
-
self, action: typing.ScheduledAction[_TState], state:
|
|
57
|
+
self, action: typing.ScheduledAction[_TState], state: _TState | None = None
|
|
58
58
|
) -> abc.DisposableBase:
|
|
59
59
|
"""Schedules an action to be executed.
|
|
60
60
|
|
|
@@ -73,7 +73,7 @@ class VirtualTimeScheduler(PeriodicScheduler):
|
|
|
73
73
|
self,
|
|
74
74
|
duetime: typing.RelativeTime,
|
|
75
75
|
action: abc.ScheduledAction[_TState],
|
|
76
|
-
state:
|
|
76
|
+
state: _TState | None = None,
|
|
77
77
|
) -> abc.DisposableBase:
|
|
78
78
|
"""Schedules an action to be executed after duetime.
|
|
79
79
|
|
|
@@ -94,7 +94,7 @@ class VirtualTimeScheduler(PeriodicScheduler):
|
|
|
94
94
|
self,
|
|
95
95
|
duetime: typing.AbsoluteTime,
|
|
96
96
|
action: abc.ScheduledAction[_TState],
|
|
97
|
-
state:
|
|
97
|
+
state: _TState | None = None,
|
|
98
98
|
) -> abc.DisposableBase:
|
|
99
99
|
"""Schedules an action to be executed at duetime.
|
|
100
100
|
|