Changeset 90152a4 for doc/theses/thierry_delisle/text/together.tex
- Timestamp:
- Aug 27, 2018, 4:40:34 PM (8 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum, stuck-waitfor-destruct
- Children:
- b7c89aa
- Parents:
- f9feab8 (diff), 305581d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 moved
-
doc/theses/thierry_delisle/text/together.tex (moved) (moved from doc/proposals/concurrency/text/together.tex ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/thierry_delisle/text/together.tex
rf9feab8 r90152a4 7 7 8 8 \section{Threads As Monitors} 9 As it was subtly alluded in section \ref{threads}, \code{thread}s in \CFA are in fact monitors, which means that all monitor features are available when using threads. For example, here is a very simple two thread pipeline that could be used for a simulator of a game engine :9 As it was subtly alluded in section \ref{threads}, \code{thread}s in \CFA are in fact monitors, which means that all monitor features are available when using threads. For example, here is a very simple two thread pipeline that could be used for a simulator of a game engine: 10 10 \begin{figure}[H] 11 11 \begin{cfacode}[caption={Toy simulator using \code{thread}s and \code{monitor}s.},label={lst:engine-v1}] … … 38 38 \end{cfacode} 39 39 \end{figure} 40 One of the obvious complaints of the previous code snippet (other than its toy-like simplicity) is that it does not handle exit conditions and just goes on forever. Luckily, the monitor semantics can also be used to clearly enforce a shutdown order in a concise manner :40 One of the obvious complaints of the previous code snippet (other than its toy-like simplicity) is that it does not handle exit conditions and just goes on forever. Luckily, the monitor semantics can also be used to clearly enforce a shutdown order in a concise manner: 41 41 \begin{figure}[H] 42 42 \begin{cfacode}[caption={Same toy simulator with proper termination condition.},label={lst:engine-v2}]
Note:
See TracChangeset
for help on using the changeset viewer.