Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: Release 1.3, Release 1.4
-
Fix Version/s: None
-
Component/s: None
-
Labels:
-
Patch:Code
-
Approval:Ok
Description
The docstring for deliver doesn't match the actual behavior. It says an exception gets thrown on multiple delivers, but that's no longer the case, as of 1.3 (hat tip to clgv on irc).
user=> (doc deliver)
-------------------------
clojure.core/deliver
([promise val])
Alpha - subject to change.
Delivers the supplied value to the promise, releasing any pending
derefs. A subsequent call to deliver on a promise will throw an exception.
nil
(let [p (promise)] (deliver p "hi") (deliver p "bye") @p) ;=> "hi"
This patch updates the docstring to reflect actual behavior: "will throw an exception." -> "will have no effect."
CLJ-1038Update docstring for deliver's actual behavior (patch applied Aug 15, 2012)CLJ-1038Update docstring for deliver's actual behavior (patch applied Aug 15, 2012)