| Safe Haskell | Trustworthy |
|---|---|
| Language | Haskell2010 |
GHC.Event
Description
This module provides scalable event notification for file descriptors and timeouts.
This module should be considered GHC internal.
The event manager state.
The event manager state.
Create a new event manager.
An I/O event.
A file descriptor registration cookie.
The lifetime of an event registration.
Since: 4.8.1.0
Constructors
| OneShot | the registration will be active for only one event |
| MultiShot | the registration will trigger multiple times |
registerFd ::EventManager ->IOCallback ->Fd ->Event ->Lifetime ->IOFdKeySource#
registerFd mgr cb fd evs lt registers interest in the eventsevs on the file descriptorfd for lifetimelt.cb is called for each event that occurs. Returns a cookie that can be handed tounregisterFd.
unregisterFd ::EventManager ->FdKey ->IO ()Source#
Drop a previous file descriptor registration.
unregisterFd_ ::EventManager ->FdKey ->IOBoolSource#
Drop a previous file descriptor registration, without waking the event manager thread. The return value indicates whether the event manager ought to be woken.
closeFd ::EventManager -> (Fd ->IO ()) ->Fd ->IO ()Source#
Close a file descriptor in a race-safe way.
typeTimeoutCallback =IO ()Source#
Callback invoked on timeout events.
A timeout registration cookie.
| EqTimeoutKeySource# | Since: 4.7.0.0 |
Instance detailsDefined inGHC.Event.TimerManager | |
registerTimeout ::TimerManager ->Int ->TimeoutCallback ->IOTimeoutKeySource#
Register a timeout in the given number of microseconds. The returnedTimeoutKey can be used to later unregister or update the timeout. The timeout is automatically unregistered after the given time has passed.
updateTimeout ::TimerManager ->TimeoutKey ->Int ->IO ()Source#
Update an active timeout to fire in the given number of microseconds.
unregisterTimeout ::TimerManager ->TimeoutKey ->IO ()Source#
Unregister an active timeout.
Produced byHaddock version 2.20.0