Compare commits
2 Commits
b2bac919ba
...
3ec43ce4b1
Author | SHA1 | Date | |
---|---|---|---|
3ec43ce4b1 | |||
5c680ac55f |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "purescript-node-stream-pipes",
|
||||
"version": "v2.1.5",
|
||||
"version": "v2.1.6",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"csv-parse": "^5.5.6",
|
||||
|
@ -1,7 +1,7 @@
|
||||
package:
|
||||
name: node-stream-pipes
|
||||
publish:
|
||||
version: '2.1.5'
|
||||
version: '2.1.6'
|
||||
license: 'GPL-3.0-or-later'
|
||||
location:
|
||||
githubOwner: 'cakekindel'
|
||||
|
@ -191,9 +191,17 @@ awaitReadableOrClosed s = Aff.supervise do
|
||||
|
||||
awaitFinished :: forall s a. Write s a => s -> Aff Unit
|
||||
awaitFinished s = Aff.supervise do
|
||||
fiber <- Aff.forkAff $ onceAff0 finishH s
|
||||
fiber <-
|
||||
Aff.forkAff
|
||||
$ parOneOf
|
||||
[ onceAff0 finishH s $> Right unit
|
||||
, Left <$> onceAff1 errorH s
|
||||
]
|
||||
finished <- liftEffect $ isWritableFinished s
|
||||
if not finished then Aff.joinFiber fiber else Aff.killFiber (error "") fiber
|
||||
if not finished then
|
||||
liftEither =<< Aff.joinFiber fiber
|
||||
else
|
||||
Aff.killFiber (error "") fiber
|
||||
|
||||
awaitWritableOrClosed :: forall s a. Write s a => s -> Aff Unit
|
||||
awaitWritableOrClosed s = Aff.supervise do
|
||||
|
Loading…
Reference in New Issue
Block a user