on master help sign in
adding comments.
b646212Kazu Yamamoto
warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs+7
@@ -149,6 +149,13 @@ waiter tvar sq enq strm pri = do
149
149
150----------------------------------------------------------------
150----------------------------------------------------------------
151
151
152+-- | It would nice if responders could return values to workers.
153+-- Unfortunately, 'ResponseReceived' is already defined in WAI 2.0.
154+-- It is not wise to change this type.
155+-- So, a reference is shared by a responder and its worker.
156+-- The reference refers a value of this type as a return value.
157+-- If 'True', the worker continue to serve requests.
158+-- Otherwise, the worker get finished.
152newtype ThreadContinue = ThreadContinue (IORef Bool)
159newtype ThreadContinue = ThreadContinue (IORef Bool)
153
160
154newThreadContinue :: IO ThreadContinue
161newThreadContinue :: IO ThreadContinue