core-async

Franco Gasperino 2021-06-26T17:22:17.099800Z

Odd that map would act that way, as map returns a channel which (i would think) could be composed as such. If i execute my example without the doseq put! operation on c1 c2 c3, it does in fact time out at the repl.

Franco Gasperino 2021-06-26T17:23:28.100Z

the same timeout behavior if i put! on c1 c2, but not c3

Franco Gasperino 2021-06-26T17:24:06.100200Z

a put! on all 3 channels results in "all channels started!"

2021-06-26T18:46:04.100400Z

The thing to understand is map is starting a go block which is basically copying from the input to the output. And your timeout has no effect on that process

2021-06-26T18:46:23.100600Z

It sits there trying to copy until the cows come home

2021-06-26T18:49:38.100800Z

In particular for map, leaving the map process sitting around doing that copying likely is not a big deal

2021-06-26T18:50:23.101Z

If I recall the output channel is unbuffered and the map process will just wedge writing to it until it gets gc'ed

2021-06-26T18:53:18.101200Z

But in general leaving that kind of process sitting around can cause things to behave unexpectedly (if the channel is buffered, or channels aren't being used as one shot value conveyors)

2021-06-26T18:56:23.101400Z

At the very least I think you'd be better off using something like merge over map, because mapping is ordered and you don't car about order