core-async

2020-03-22T20:32:31.264600Z

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?

dpsutton 2020-03-22T20:48:12.265Z

(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

2020-03-22T20:50:16.265700Z

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

ghadi 2020-03-22T20:50:21.265900Z

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

2020-03-22T20:50:37.266300Z

doesn't work as in block seemingly endlessly

ghadi 2020-03-22T20:51:21.266900Z

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

ghadi 2020-03-22T20:51:29.267200Z

doesn't matter the syntax

ghadi 2020-03-22T20:52:43.269300Z

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

2020-03-22T20:53:56.270400Z

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.

ghadi 2020-03-22T20:54:51.271100Z

-> is low on the list of suspects