Changeset 35453 in project


Ignore:
Timestamp:
04/27/18 20:53:42 (4 weeks ago)
Author:
svnwiki
Message:

Anonymous wiki edit for IP [213.52.73.118]: gochan: docs from readme (via markdown-svnwiki)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/gochan

    r34467 r35453  
    11== chicken-gochan
    22[[toc:]]
    3 [[http://golang.org/|Go]]-inspired channels for [[http://call-cc.org/|Chicken Scheme]]. Essentially thread-safe
    4 fifo queues that are useful for thread communication and
    5 synchronization.
     3[[http://golang.org/|Go]]-inspired channels for [[http://call-cc.org/|Chicken Scheme]] ([[http://synthcode.com/wiki/chibi-scheme|Chibi Scheme]] might work
     4too). Essentially thread-safe fifo queues that are useful for thread
     5communication and synchronization.
    66
    77
     
    1616* buffered channels
    1717* timeouts as ordinary receive on a channel
    18 * closable channels
     18* closable channels with close-reason (aka {{fail-flag}})
    1919* load-balancing when multiple channels have data ready
    2020
     
    2929* sending to a channel that gets closed does not panic, it unblocks
    3030  all senders immediately with the {{fail}} flag set to non-{{#f}}.
    31 * closing an already closed channel has no effect, and is not an error
    32   ({{gochan-close}} is idempotent).
     31* closing an already closed channel does not result in error.
    3332* {{nil}}-channels aren't supported, create new forever-blocking {{(gochan 0)}} instead.
    3433* Unlike in [[http://golang.org/|Go]], you can choose what channels to select on at runtime with {{gochan-select*}}
     
    117116(gochan-select ((chan1 -> msg fail) (if fail #!eof msg))
    118117               (else 'eagain))
     118
    119119</enscript>
    120120
    121121<procedure> (gochan-send chan msg)</procedure>
    122 
    123122
    124123
     
    141140mechanism. {{fail-flag}} cannot be {{#f}} as that would indicate a
    142141successful message transaction.
     142
     143Closing an already closed channel will results in its {{fail-flag}}
     144being updated.
    143145
    144146<procedure> (gochan-after duration/ms)</procedure>
Note: See TracChangeset for help on using the changeset viewer.