Back

multiplex (clj)

(source)

function

(multiplex & ports)
Returns a multiplexing read port which, when read from, produces a value from one of ports. If at read time only one port is available to be read from, the multiplexing port will return that value. If multiple ports are available to be read from, the multiplexing port will return one value from a port chosen non-deterministicly. If no port is available to be read from, parks execution until a value is available.

Examples