Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions reactivex/operators/_timeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
SingleAssignmentDisposable,
)
from reactivex.internal import curry_flip
from reactivex.scheduler import TimeoutScheduler
from reactivex.scheduler import EventLoopScheduler

_T = TypeVar("_T")

_default_timeout_scheduler = EventLoopScheduler()


@curry_flip
def timeout_(
Expand Down Expand Up @@ -48,7 +50,7 @@ def subscribe(
observer: abc.ObserverBase[_T],
scheduler_: abc.SchedulerBase | None = None,
) -> abc.DisposableBase:
_scheduler = scheduler or scheduler_ or TimeoutScheduler.singleton()
_scheduler = scheduler or scheduler_ or _default_timeout_scheduler

switched = [False]
_id = [0]
Expand Down