11 Concurrency and Parallelism

Racket supports multiple threads of control within a program, thread-local storage, some primitive synchronization mechanisms, and a framework for composing synchronization abstractions. In addition, the racket/future and racket/place libraries provide support for parallelism to improve performance.

    11.1 Threads

      11.1.1 Creating Threads

      11.1.2 Suspending, Resuming, and Killing Threads

      11.1.3 Synchronizing Thread State

      11.1.4 Thread Mailboxes

    11.2 Synchronization

      11.2.1 Events

      11.2.2 Channels

      11.2.3 Semaphores

      11.2.4 Buffered Asynchronous Channels

        11.2.4.1 Creating and Using Asynchronous Channels

        11.2.4.2 Contracts and Impersonators on Asynchronous Channels

    11.3 Thread-Local Storage

      11.3.1 Thread Cells

      11.3.2 Parameters

    11.4 Futures

      11.4.1 Creating and Touching Futures

      11.4.2 Future Semaphores

      11.4.3 Future Performance Logging

    11.5 Places

      11.5.1 Using Places

      11.5.2 Places Logging

    11.6 Engines

    11.7 Machine Memory Order