Documentation

Std.Sync.CancellationToken

This module contains the implementation of Std.CancellationToken. Std.CancellationToken provides a cancellation primitive for signaling cancellation between tasks or threads. It supports both synchronous and asynchronous waiting, and is useful for cases where you want to notify one or more waiters that a cancellation has occurred.

Reasons for cancellation.

Instances For
    Instances For

      The central state structure for a CancellationToken.

      Instances For

        A cancellation token is a synchronization primitive that allows multiple consumers to wait until cancellation is requested.

        Instances For

          Creates a new cancellation token.

          Instances For

            Cancels the token with the given reason, notifying all currently waiting consumers. Once cancelled, the token remains cancelled.

            Instances For

              Checks if the token is cancelled.

              Instances For

                Gets the cancellation reason if the token is cancelled.

                Instances For

                  Waits for cancellation. Returns a task that completes when cancelled.

                  Instances For

                    Creates a selector that waits for cancellation.

                    Instances For