wip: explore removing delays(6)

This commit is contained in:
orion 2024-05-14 10:55:14 -05:00
parent dfdca9f5e9
commit ba8d90038d
Signed by: orion
GPG Key ID: 6D4165AE4C928719

View File

@ -119,6 +119,8 @@ fromTransform t =
maybeYield1
pure $ Loop { error, cancel }
O.WriteWouldBlock -> do
queueLen <- liftEffect $ O.readableLength t
when (queueLen == 0) $ liftAff $ O.awaitReadableOrClosed t
yieldWhileReadable
liftAff $ O.awaitWritableOrClosed t
pure $ Loop { error, cancel }