Fork me on GitHub
#core-async
<
2020-03-22
>
thegeez20:03:31

I probably hit some transient issue in my system, but I may have run into a case where

(-> (..return a chan..) <!!)
doesn't work while
(let [rc (..return a chan..)] (<!! rc))
does work? Does that ring a bell for anybody?

dpsutton20:03:12

(let [c (a/chan)
      f (fn [] c)]
  (a/go (a/>! c :value))
  (a/go (-> (f) a/<! prn))
  nil)
seems to work in a very simple case

thegeez20:03:16

Meant <!! as well, and for me the simple case works too

ghadi20:03:21

doesn't work...... how?

thegeez20:03:37

doesn't work as in block seemingly endlessly

ghadi20:03:21

a channel that doesn't give any values will block endlessly if you take from it

ghadi20:03:29

doesn't matter the syntax

ghadi20:03:43

could it be that something else is different about the two different tests that were performed?

thegeez20:03:56

Yeah, I convinced myself that maybe the syntax would be the difference, but another issue somewhere is more likely. Couldn't really google on thread-first with core.async. Therefor wanted to check if this syntax was something that maybe could have been a thing.

ghadi20:03:51

-> is low on the list of suspects