Fork me on GitHub

@tbaldridge Specifically I was referring to the >af must close! the channel before returning. part of pipeline async, so my understanding of how is works is: input-> from chan -> transducer fn (spins off async task and closes to chan [but wouldn't that not give the async task a chance to write out?]) -> to chan


And it feels a bit odd to have af wait for the async task to finish, write to the chan, and then closes the chan


or a missing some obvious 🙂


@royalaid the key thing is that af can write 0 or more items to the channel. It could just close it and write nothing, or it could write dozens of things. The other key thing is that af is free to hand that channel out to anything, another library or some other module.


The async part of the name pipeline-async hints at that. The execution of the af is considered async. Sure it could do all its calculations during the call to af but it doesn't have to.


OHHHHHH So the async part of af can close the channel? Because this whole time I was under the impression that it had to be the very outside af and could not be nested in any go/thread blocks


@royalaid correct, af can do whatever it wants with that channel, the pipeline will splice any data it receives from that channel into the output of the pipeline.


Is it possible to create the channel with a transducer which transforms values only when they are taken from the channel? I'm trying to replicate the error example from this post: and so far it looks like the error value is transduced as soon as it's put into channel.


I am fairly new to core-async, does anyone know if is it idiomatic to pass channels via other channels?