[ASYNC-70] documentation of thread macro should include behavior of nil (closes the channel) Created: 15/May/14 Updated: 14/Nov/14
|Reporter:||Howard Lewis Ship||Assignee:||Unassigned|
I needed the ability to invoke some code in a thread, and have the channel close if nil was returned.
Digging though the code, I discovered it already does this, but it is no documented in the docstring.
I'll supply a patch shortly.
|Comment by Alex Miller [ 23/Jun/14 11:15 AM ]|
The thread docstring says: "Returns a channel which will receive the result of the body when completed." The special case of a null return value is actually handled by ignoring it (because you are not allowed to explicitly put nils on a channel). The channel is closed on completion regardless. I'm not sure I get what needs to be added here and no patch, so closing. Reopen if there is a concrete suggestion to evaluate.
|Comment by Howard Lewis Ship [ 14/Nov/14 10:41 AM ]|
It's a tiny little patch. DRY is great for code, less so for docs!