core.async

mistake in core.async put! docstring

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code
  • Approval:
    Vetted

Description

In [1], correct statement should be "passing false iff port is already closed" instead of current "passing true iff port is already closed".

Current behavior is that put callback fn gets true if a channel is not already closed:

user=> (require '[clojure.core.async :as async])
nil
user=> (def c (async/chan 1))
#'user/c
user=> (async/put! c :foo #(println "got " %))
got  true
true
user=> (async/close! c)
nil
user=> (async/put! c :foo #(println "got " %))
got  false
false

From Jozef Wagner in https://groups.google.com/forum/#!topic/clojure-dev/zduW2jMndZ4

[1] https://github.com/clojure/core.async/blob/422f8b25f0c4d5e3aea5113436c735e553422be7/src/main/clojure/clojure/core/async.clj#L140

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: