Fork me on GitHub
#core-async
<
2016-03-01
>
ska21:03:21

Can someone help me with a blocking write that I do not quite understand?

ska21:03:03

So, I spawn a future basically like this:

(future (let [thing (<!! my-channel)] (println "Recevied" thing)))

ska21:03:57

The channel

my-channel
is created as
(chan 2)
in another function and passed to above code as a parameter

ska21:03:58

and in another future I try to do this: (future (read some other channel til it is closed and then) (do (println "pre") (>!! my-channel) (println "post"))) Again, this code is from a function which gets my-channel from the same caller as the previous one. Problem is: I never see the print "post".

ska21:03:03

Given the amount of time I have been staring at this, it must be something stupid that I am missing. 😉

ska21:03:27

OK, I already acknowledged, that'd be stupid. I was missing the thing to put on the channel in (>!! my-channel) Sorry for the noise.