Skip to content

Commit

Permalink
coding style only
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Nov 11, 2024
1 parent 98bdb5a commit bcec0ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Network/HTTP2/Client/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,12 @@ sendStreaming
-> (OutBodyIface -> IO ())
-> IO (TBQueue StreamingChunk)
sendStreaming Context{..} strm strmbdy = do
let label = "H2 streaming supporter for stream " ++ show (streamNumber strm)
tbq <- newTBQueueIO 10 -- fixme: hard coding: 10
forkManagedUnmask threadManager label $ \unmask ->
withOutBodyIface tbq unmask strmbdy
return tbq
where
label = "H2 request streaming sender for stream " ++ show (streamNumber strm)

exchangeSettings :: Context -> IO ()
exchangeSettings Context{..} = do
Expand Down
2 changes: 1 addition & 1 deletion Network/HTTP2/H2/Manager.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ data TimeoutHandle
| ThreadWithoutTimeout

cancelTimeout :: TimeoutHandle -> IO ()
cancelTimeout (ThreadWithTimeout h) = T.cancel h
cancelTimeout (ThreadWithTimeout th) = T.cancel th
cancelTimeout ThreadWithoutTimeout = return ()

type ManagedThreads = Map ThreadId TimeoutHandle
Expand Down
3 changes: 2 additions & 1 deletion Network/HTTP2/Server/Worker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ sendStreaming
-> (OutBodyIface -> IO ())
-> IO (TBQueue StreamingChunk)
sendStreaming Context{..} strm th strmbdy = do
let label = "H2 streaming supporter for stream " ++ show (streamNumber strm)
tbq <- newTBQueueIO 10 -- fixme: hard coding: 10
forkManaged threadManager label $
withOutBodyIface tbq id $ \iface -> do
Expand All @@ -154,6 +153,8 @@ sendStreaming Context{..} strm th strmbdy = do
}
strmbdy iface'
return tbq
where
label = "H2 response streaming sender for " ++ show (streamNumber strm)

-- | Worker for server applications.
worker :: Config -> Server -> Context -> Stream -> InpObj -> IO ()
Expand Down

0 comments on commit bcec0ec

Please sign in to comment.