Welcome! Please see the About page for a little more info on how this works.

0 votes
in core.async by

Not sure if this is really a bug but it stroke me as odd:

(async/poll! (async/to-chan [1 2 3])) ; => nil

Seems like the channel returned by {{to-chan}} should always be immediately ready for taking. Then again this is not mentioned in its docstring so maybe it's all fine. Just thought I'd file it in case it might hint at some deeper issue with poll! or {{to-chan}}.

3 Answers

0 votes
by

Comment made by: alexmiller

async/to-chan uses async/onto-chan, which fills the channel via an asynchronous go loop, so there is a slight delay before the first value is available in this channel. I'm not sure what, if anything, I would call an error in that stack of calls.

0 votes
by

Comment made by: dergutemoritz

Agreed, and it's totally in line with how it's documented anyway, so feel free to close. Sorry for the noise :)

0 votes
by
Reference: https://clojure.atlassian.net/browse/ASYNC-202 (reported by alex+import)
...