alts! is a function that accepts a vector of channels to take from and/or channels with values to be put on them (in the form of doubleton vectors: [c v]). The vector may be dynamically constructed; the code calling alts! may not know how many channels it'll be choosing among (and indeed that number need not be constant across invocations).
alt! is a convenience macro which basically acts as a cross between cond and alts!. Here the number of "ports" (channels or channel+value pairs) must be known statically, but in practice this is quite often the case and the cond-like syntax is very clear.
alt! expands to a somewhat elaborate expression using alts!; apart from the syntactic convenience, it offers no extra functionality.
alts!
is a function that accepts a vector of channels to take from and/or channels with values to be put on them (in the form of doubleton vectors:[c v]
). The vector may be dynamically constructed; the code callingalts!
may not know how many channels it'll be choosing among (and indeed that number need not be constant across invocations).alt!
is a convenience macro which basically acts as a cross betweencond
andalts!
. Here the number of "ports" (channels or channel+value pairs) must be known statically, but in practice this is quite often the case and thecond
-like syntax is very clear.alt!
expands to a somewhat elaborate expression usingalts!
; apart from the syntactic convenience, it offers no extra functionality.