Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Network.HTTP2.Internal
Contents
Synopsis
- data Manager
- type Action = IO ()
- start :: Manager -> IO Manager
- setAction :: Manager -> Action -> IO ()
- stopAfter :: Manager -> IO a -> (Either SomeException a -> IO b) -> IO b
- spawnAction :: Manager -> IO ()
- forkManaged :: Manager -> IO () -> IO ()
- forkManagedUnmask :: Manager -> ((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)
- incCounter :: Manager -> IO ()
- decCounter :: Manager -> IO ()
- 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 -> (Either SomeException a -> IO b) -> IO b Source #
Stopping the manager.
spawnAction :: Manager -> IO () Source #
Spawning the action.
forkManaged :: Manager -> 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 -> ((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 # |
incCounter :: Manager -> IO () Source #
decCounter :: Manager -> IO () Source #
waitCounter0 :: Manager -> IO () Source #