Changeset ac5d22f for doc/theses
- Timestamp:
- Jun 1, 2023, 11:58:05 AM (20 months ago)
- Branches:
- ast-experimental, master
- Children:
- 0aef549
- Parents:
- 22f2b7d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/colby_parsons_MMAth/text/channels.tex
r22f2b7d rac5d22f 19 19 It was the popularity of Go channels that lead to their implemention in \CFA. 20 20 Neither Go nor \CFA channels have the restrictions of the early channel-based concurrent systems. 21 22 Other popular languages and libraries that provide channels include C++ Boost~\cite{boost:channel}, Rust~\cite{rust:channel}, Haskell~\cite{haskell:channel}, and OCaml~\cite{ocaml:channel}. 23 Boost channels only support asynchronous (non-blocking) operations, and Rust channels are limited to only having one consumer per channel. 24 Haskell channels are unbounded in size, and OCaml channels are zero-size. 25 These restrictions in Haskell and OCaml are likely due to their functional approach, which results in them both using a list as the underlying data structure for their channel. 26 These languages and libraries are not discussed further, as their channel implementation is not comparable to the bounded-buffer style channels present in Go and \CFA. 21 27 22 28 \section{Producer-Consumer Problem} … … 130 136 \paragraph{Go channels} provide a set of tools to help with concurrent shutdown~\cite{go:chan}. 131 137 Channels in Go have a @close@ operation and a \Go{select} statement that both can be used to help threads terminate. 132 The \Go{select} statement is discussed in \ref{s:waituntil}, where \CFA's @waituntil@ statement is compared with the Go \Go{select} statement.138 The \Go{select} statement is discussed in Chapter~\ref{s:waituntil}, where \CFA's @waituntil@ statement is compared with the Go \Go{select} statement. 133 139 134 140 The @close@ operation on a channel in Go changes the state of the channel. … … 247 253 \begin{cfa}[aboveskip=0pt,belowskip=0pt] 248 254 var cons_done, prod_done bool = false, false; 249 var prodJoin chan int = make(chan int , Producers)250 var consJoin chan int = make(chan int , Consumers)255 var prodJoin chan int = make(chan int) 256 var consJoin chan int = make(chan int) 251 257 252 258 func consumer( channel chan uint64 ) {
Note: See TracChangeset
for help on using the changeset viewer.