@@ -149,6 +149,13 @@ waiter tvar sq enq strm pri = do
150----------------------------------------------------------------
150----------------------------------------------------------------
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)
154newThreadContinue :: IO ThreadContinue
161newThreadContinue :: IO ThreadContinue