Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Network.HTTP2.Internal
Contents
Synopsis
- data Manager
- start :: Manager -> IO Manager
- stopAfter :: Manager -> IO a -> (Maybe SomeException -> IO ()) -> IO a
- forkManaged :: Manager -> String -> IO () -> IO ()
- forkManagedUnmask :: Manager -> String -> ((forall x. IO x -> IO x) -> IO ()) -> IO ()
- timeoutKillThread :: Manager -> (Handle -> IO a) -> IO a
- timeoutClose :: Manager -> IO () -> IO (IO ())
- data KilledByHttp2ThreadManager = KilledByHttp2ThreadManager (Maybe SomeException)
- waitCounter0 :: Manager -> IO ()
Thread Manager
start :: Manager -> IO Manager Source #
Starting a thread manager.
Its action is initially set to 'return ()' and should be set
by setAction
. This allows that the action can include
the manager itself.
stopAfter :: Manager -> IO a -> (Maybe SomeException -> IO ()) -> IO a Source #
Stopping the manager.
The action is run in the scope of an exception handler that catches all exceptions (including asynchronous ones); this allows the cleanup handler to cleanup in all circumstances. If an exception is caught, it is rethrown after the cleanup is complete.
forkManaged :: Manager -> String -> IO () -> IO () Source #
Fork managed thread
This guarantees that the thread ID is added to the manager's queue before the thread starts, and is removed again when the thread terminates (normally or abnormally).
forkManagedUnmask :: Manager -> String -> ((forall x. IO x -> IO x) -> IO ()) -> IO () Source #
Like forkManaged
, but run action with exceptions masked
timeoutKillThread :: Manager -> (Handle -> IO a) -> IO a Source #
Killing the IO action of the second argument on timeout.
timeoutClose :: Manager -> IO () -> IO (IO ()) Source #
Registering closer for a resource and returning a timer refresher.
data KilledByHttp2ThreadManager Source #
Constructors
KilledByHttp2ThreadManager (Maybe SomeException) |
Instances
Exception KilledByHttp2ThreadManager Source # | |
Defined in Network.HTTP2.H2.Manager | |
Show KilledByHttp2ThreadManager Source # | |
Defined in Network.HTTP2.H2.Manager Methods showsPrec :: Int -> KilledByHttp2ThreadManager -> ShowS # show :: KilledByHttp2ThreadManager -> String # showList :: [KilledByHttp2ThreadManager] -> ShowS # |
waitCounter0 :: Manager -> IO () Source #