Content deleted Content added
Added a few examples of channels, and cleaned up some wording that was specific to only one specific implementation. |
m WP:CHECKWIKI error fixes, removed stub tag using AWB (10905) |
||
Line 7:
==Channel implementations==
Channels modeled after the CSP model are inherently [[Synchronization (computer science)|synchronous]]: a process waiting to receive an object from a channel will [[
Typical supported operations are presented below using the example of the [[libthread]] channel API.
* Channel creation of fixed or variable size, returning a [[reference]] or [[Reference (computer science)|handle]] <source lang="c">Channel* chancreate(int elemsize, int bufsize)</source>
Line 14:
===libthread channels===
The [[Multithreading (computer architecture)|Multithreading]] library, [[libthread]], which was first created for the operating system [[Plan 9 from Bell Labs|Plan 9]], offers inter-thread communication based on fixed-size channels.
Line 25:
=== XMOS XC ===
The [[
In this example, two hardware threads are started on the XMOS, running the two lines in the "par" block. The first line transmits the number 42 through the channel while the second waits until it is received and sets the value of x. The XC language also allows asynchronous receiving on channels through a select statement.
Line 64:
* [http://www.stackless.com/wiki/Channels Stackless.com – Channels]
* [http://caml.inria.fr/pub/docs/manual-ocaml/libref/Event.html – OCaml Events]
[[Category:Inter-process communication]]
|