on master help sign in
adding comments.
commitb646212005aaa6e2e9e209e15e32d3e6d530208e authorKazu Yamamoto <kazu@iij.ad.jp> dateTue 21 Jul 2015, 11:37 (11 years ago) parentf1bc08d
1 file changed+7
warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs+7
warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs+7
@@ -149,6 +149,13 @@ waiter tvar sq enq strm pri = do
149149
150150----------------------------------------------------------------
151151
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.
152159newtype ThreadContinue = ThreadContinue (IORef Bool)
153160
154161newThreadContinue :: IO ThreadContinue