Safe Haskell | Safe |
---|
- data Subscriber s v = Subscriber {
- onEvent :: Event v -> SchedulerIO s ()
- disposables :: DisposableSet
- lockedThread :: TVar ThreadId
- threadLockCounter :: TVar Word32
- disposed :: TVar Bool
- addSubscriptionDisposable :: Subscriber s v -> Disposable -> IO ()
- disposeSubscriber :: Subscriber s v -> IO ()
Documentation
data Subscriber s v Source
Receives events from a signal with values of type v
and running in a scheduler of type s
.
Note that s
refers to the scheduler that events must be sent on. Events are always sent
synchronously, regardless of s
.
Subscriber | |
|
addSubscriptionDisposable :: Subscriber s v -> Disposable -> IO ()Source
Adds a disposable representing a subscription to the subscriber. If the subscriber is later sent completed or error, the disposable will be disposed.
disposeSubscriber :: Subscriber s v -> IO ()Source
Disposes the subscriber, preventing it from receiving any new events.