Chapter 1. The concurrent category: concurrency support

Table of Contents
1.1. Concurrent Haskell
1.2. Concurrency Basics
1.3. Scheduling
1.4. Concurrency abstractions
1.5. The Concurrent library interface
1.6. GHC-specific concurrency issues

1.1. Concurrent Haskell

GHC and Hugs both provide concurrency extensions, as described in Concurrent Haskell.

Concurrency in GHC and Hugs is "lightweight", which means that both thread creation and context switching overheads are extremely low. Scheduling of Haskell threads is done internally in the Haskell runtime system, and doesn't make use of any operating system-supplied thread packages.

Haskell threads can communicate via MVars, a kind of synchronised mutable variable. Several common concurrency abstractions can be built from MVars, and these are provided by the Concurrent library, which is described in the later sections. Threads may also communicate via exceptions.