@@ -1,5 +1,8 @@
11{-# LANGUAGE CPP #-}
22
3+-- | A thread pool manager.
4+-- The manager has responsibility to spawn and kill
5+-- worker threads.
36module Network.Wai.Handler.Warp.HTTP2.Manager (
47 Manager
58 , start
@@ -26,8 +29,9 @@ data Command = Stop | Spawn | Replace ThreadId
2629data Manager = Manager (TQueue Command) (IORef (IO ()))
2730
2831-- | Starting a thread pool manager.
29−-- Its action is 'return ()' to allow the action can include
30−-- this manager itself.
32+-- Its action is initially set to 'return ()' and should be set
33+-- by 'setAction'. This allows that the action can include
34+-- the manager itself.
3135start :: IO Manager
3236start = do
3337 tset <- newThreadSet