Content deleted Content added
No edit summary |
No edit summary |
||
Line 21:
=== XMOS XC ===
The [[XMOS]] programming language [[XC (programming language)|XC]] provides a primitive type "chan" and two operators "<:" and ":>" for sending and receiving data from a channel.<ref>{{Cite web |url=https://www.xmos.com/node/17653?version=&page=23 |title=Archived copy |access-date=2015-05-10 |archive-url=https://web.archive.org/web/20160304132653/https://www.xmos.com/node/17653?version=&page=23 |archive-date=2016-03-04 |url-status=dead }}</ref>
Line 36 ⟶ 35:
=== Go ===
This snippet of 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>https://golang.org/doc/effective_go.html#channels</ref>
|