core.async

incorrect behavior in CLJS when using <! in loop/recur binding

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

(loop [x (<! c)]
   ...)

does not work correctly, you will get nil values on some reads off this channel, you have to write

(loop []
  (let [x (<! c)]
    ...))

in order to only get nil when the channel closes.

Activity

Hide
Timothy Baldridge added a comment -

Can't reproduce

Show
Timothy Baldridge added a comment - Can't reproduce
Hide
David Nolen added a comment -

Sorry I should have been more specific this appears to affect ClojureScript core.async not Clojure.

Show
David Nolen added a comment - Sorry I should have been more specific this appears to affect ClojureScript core.async not Clojure.
Hide
Alexander Redington added a comment -

David Nolen I have tried to reproduce on https://github.com/aredington/core.async/blob/ASYNC-2-TEST/src/test/clojure/clojure/core/async/ioc_macros_test.clj#L191 but cannot generate failures. Is there a way to adjust the test to more reliably provoke failure?

Show
Alexander Redington added a comment - David Nolen I have tried to reproduce on https://github.com/aredington/core.async/blob/ASYNC-2-TEST/src/test/clojure/clojure/core/async/ioc_macros_test.clj#L191 but cannot generate failures. Is there a way to adjust the test to more reliably provoke failure?

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: