http2-5.3.6: HTTP/2 library
Safe HaskellNone
LanguageHaskell2010

Network.HTTP2.Internal

Synopsis

Thread Manager

data Manager Source #

Manager to manage the thread and the timer.

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

withTimeout :: Manager -> (Handle -> IO a) -> IO a Source #

data KilledByHttp2ThreadManager Source #

Constructors

KilledByHttp2ThreadManager (Maybe SomeException) 

Instances

Instances details
Exception KilledByHttp2ThreadManager Source # 
Instance details

Defined in Network.HTTP2.H2.Manager

Show KilledByHttp2ThreadManager Source # 
Instance details

Defined in Network.HTTP2.H2.Manager