Re: Puzzlement over closing core.async channels asynchronously

2015-09-17 Thread Raoul Duke
> Thanks for the rapid response! You could say that you put this in there as > an exercise for the viewer; I know that in discussing it amongst ourselves, > we definitely sharpened our understanding of some of the concepts. I guess I'd see it as an argument for static checking around concurrency,

Re: Puzzlement over closing core.async channels asynchronously

2015-09-17 Thread James Elliott
Thanks for the rapid response! You could say that you put this in there as an exercise for the viewer; I know that in discussing it amongst ourselves, we definitely sharpened our understanding of some of the concepts. I had tried submitting an erratum via O’Reilly before posting to this list, b

Re: Puzzlement over closing core.async channels asynchronously

2015-09-17 Thread Timothy Baldridge
Yes, I'm pretty sure that was a quick-and-dirty example, and I probably should have clarified that in the course. You are correct, there is a race condition between the go loops, and that one of them may close the output channel before the others have finished processing their results. Probably be

Puzzlement over closing core.async channels asynchronously

2015-09-17 Thread James Elliott
We’ve been watching Timothy Baldridge’s great O’Reilly video series on core.async, but are perplexed by one of the examples. In lecture 14 on tuning back-pressure, he introduces a function map-pipe for giving a channel a pipeline of work to do, and then as the final step, adds the ability to ad