chickadee » gochan » gochan-select*

gochan-select* chansprocedure

This procedure allows selecting channels that are chosen programmatically. It takes input that looks like this:

(gochan-select `((,chan1 meta1)
                 (,chan2 meta2 message)
                 (,chan3 meta3) ...))

It returns three values, msg fail meta, where msg is the message that was sent over the channel, fail is true if the channel was closed and false otherwise, and meta is the datum supplied in the arguments.

For example, if a message arrived on chan3 above, for example, meta would be 'meta3 in that case. This allows you to see which channel a message came from (i.e. if you supply meta data that is the channel itself)