Fork me on GitHub
#core-async
<
2016-12-28
>
royalaid02:12:25

@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

royalaid02:12:04

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

royalaid02:12:20

or a missing some obvious 🙂

tbaldridge03:12:32

@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.

tbaldridge03:12:10

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.

royalaid07:12:40

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

tbaldridge16:12:05

@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.

metametadata21:12:10

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: http://blog.venanti.us/using-transducers-with-core-async-clojurescript/ and so far it looks like the error value is transduced as soon as it's put into channel.

danboykis21:12:28

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