+-- #hide
module Network.HTTP.Lucu.ResponseWriter
- ( responseWriter -- Config -> Handle -> InteractionQueue -> IO ()
+ ( responseWriter
)
where
import Control.Concurrent
import Debug.Trace
+import GHC.Conc (unsafeIOToSTM)
responseWriter :: Config -> Handle -> InteractionQueue -> ThreadId -> IO ()
writeHeader itr
= do res <- atomically $ do writeItr itr itrWroteHeader True
readItr itr itrResponse id
- hPutResponse h (fromJust res)
+ hPutResponse h res
hFlush h
awaitSomethingToWrite