Skip to content

Commit

Permalink
Complete SenderCollect case of runPipelinedPeer
Browse files Browse the repository at this point in the history
Relying on tryReadTBQueue
  • Loading branch information
dcoutts committed Feb 11, 2019
1 parent c153eb7 commit 27f2c87
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions typed-protocols/src/Network/TypedProtocol/Driver.hs
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,10 @@ runPipelinedPeerSender receiveQueue collectQueue Codec{encode} Channel{send} =
go n (k c)

go (Succ n) (SenderCollect (Just k') k) = do
fail "TODO: need tryReadTBQueue"
-- mc <- atomically (tryReadTBQueue collectQueue)
-- case mc of
-- Nothing -> go (Succ n) k'
-- Just c -> go n (k c)
mc <- atomically (tryReadTBQueue collectQueue)
case mc of
Nothing -> go (Succ n) k'
Just c -> go n (k c)


runPipelinedPeerReceiverQueue
Expand Down

0 comments on commit 27f2c87

Please sign in to comment.