Channel (programming): Difference between revisions

Content deleted Content added
rv conflict of interest
 
(2 intermediate revisions by 2 users not shown)
Line 53:
 
=== Go ===
This snippet of [[Go (programming language)|Go]] code performs similarly to the XC code. First the channel c is created, then a [[goroutine]] is spawned which sends 42 through the channel. When the number is put in the channel x is set to 42. Go allows channels to buffer contents, as well as non blocking receiving through the use of a select block.<ref>{{Cite web|url=https://golang.org/doc/effective_go.html#channels|title = Effective Go - the Go Programming Language}}</ref>
 
<syntaxhighlight lang="go">
Line 64:
 
=== Rust ===
[[Rust (programming language)|Rust]] provides asynchronous channels for communication between threads. Channels allow a unidirectional flow of information between two end-pointsendpoints: the <code>Sender</code> and the <code>Receiver</code>.<ref>{{cite web |title=Channels - Rust By Example |url=https://doc.rust-lang.org/rust-by-example/std_misc/channels.html |website=doc.rust-lang.org |access-date=28 November 2020}}</ref>
 
<syntaxhighlight lang="rust">
Line 86:
 
== List of implementations ==
* List of non-standard, library -based implementations of channels
 
* List of non-standard, library based implementations of channels
 
* For Scala:
Line 94 ⟶ 93:
* For C++:
** [[stlab]]<ref>{{cite web|url=https://stlab.cc/libraries/concurrency|title=stlab is the ongoing work of what was Adobe's Software Technology Lab. The Adobe Source Libraries (ASL), Platform Libraries, and new stlab libraries are hosted on github.|date=2021-01-31}}</ref> This implementation supports splits, and different merge and zip operations. Different executors can be attached to the individual nodes.
 
* For Rust:
** [[Tokio (software)|Tokio]]
 
== References ==