Changeset 37566 in project


Ignore:
Timestamp:
04/28/19 23:23:35 (3 months ago)
Author:
svnwiki
Message:

Anonymous wiki edit for IP [74.73.44.58]: Added documentation of gochan-select*, since it is exported.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/gochan

    r36505 r37566  
    119119</enscript>
    120120
     121<procedure> (gochan-select* chans)</procedure>
     122
     123This procedure allows selecting channels that are chosen
     124programmatically.  It takes input that looks like this:
     125
     126<enscript highlight="scheme">
     127(gochan-select `((,chan1 meta1)
     128                 (,chan2 meta2 message)
     129                 (,chan3 meta3) ...))
     130</enscript>
     131
     132It returns three values, {{msg fail meta}},
     133where {{msg}} is the message that was sent over the channel, {{fail}} is true
     134if the channel was closed and false otherwise, and {{meta}} is the datum supplied
     135in the arguments.
     136
     137For example, if a message arrived on {{chan3}} above, for example, {{meta}} would be
     138{{'meta3}} in that case. This allows you to see which channel a message
     139came from (i.e. if you supply meta data that is the channel itself)
     140
    121141<procedure> (gochan-send chan msg)</procedure>
    122142
Note: See TracChangeset for help on using the changeset viewer.