15. Building concurrency abstractions

In this chapter, we show how to build high-level parallel abstractions like Monitor, etc as used in section and subsequent sections. These abstractions are built from primitive language mechanism in qBeta including preemptive coroutines and a basic synchronisation mechanism.

In the next section, we introduce preemptive coroutines. Then follows a section where we describe the basic synchronization mechanism and show how to define the low-level synchronization mechanisms Lock and Semaphore. In the remaining sections we show how to define higher-level mechanisms like Monitor and asynchronous message-passing.