Fork me on GitHub
#core-async
<
2019-02-13
>
dehli15:02:19

To update from yesterday, I ended up adding (.exportSymbol js/goog "setTimeout" js/setTimeout) to be executed before the top-level go block and I was able to get it working. Thanks again for the help!

dehli16:02:26

I haven't been able to find the answer via google, but do go block channels auto close themselves? I'm trying to put a value onto a channel created via a go block and it's returning false

Jan K16:02:31

@dehli The channel returned from (go ...) is closed when the go block exits. You shouldn't try to put anything to it.

dehli16:02:00

Gotcha, that makes sense. Is there a way to repeatedly "take" the same value from a channel? More analogous to how JS promises work

dehli16:02:58

I see that there is a promise-chan which can only store one value, but can you still only take the value once?

Jan K16:02:29

promise-chan will keep giving you the same value with repeated takes

dehli16:02:43

Great 😄 That's exactly what I need! Thanks!

serioga20:02:04

but I guess there is no promise-chan in cljs