Crate async_stm

source ·

Modules§

  • Auxiliary transactions.
  • Transactional queue implementations.

Macros§

  • Reuse the same test definitions for each implementation of the TQueueLike trait by calling this macro with a function to create a new instance of the queue.

Structs§

  • TVar is the public interface to lift data into the transactional context for subsequent read and write operations. TVar is our handle to a variable, but reading and writing go through a transaction. It also tracks which threads are waiting on it.

Enums§

  • Transaction shortcutting signals handled by the STM framework.
  • STM error extended with the ability to abort the transaction with an error. It is separate so that we rest assured that atomically will not return an error, that only atomically_or_err allows abortions.

Functions§

  • The primary verbs to interact with STM transactions. Abort the transaction with an error.
  • The primary verbs to interact with STM transactions. Create a new transaction and run f until it returns a successful result and can be committed without running into version conflicts.
  • The primary verbs to interact with STM transactions. Like atomically, but this version also takes an auxiliary transaction system that gets committed or rolled back together with the STM transaction.
  • The primary verbs to interact with STM transactions. Create a new transaction and run f until it returns a successful result and can be committed without running into version conflicts, or until it returns an StmError::Abort in which case the contained error is returned.
  • The primary verbs to interact with STM transactions. Like atomically_or_err, but this version also takes an auxiliary transaction system.
  • The primary verbs to interact with STM transactions. Retry unless a given condition has been met.
  • The primary verbs to interact with STM transactions. Run the first function; if it returns a StmControl::Retry, run the second function; if that too returns StmControl::Retry then combine the values they have read, so that the overall retry will react to any change.
  • The primary verbs to interact with STM transactions. Abandon the transaction and retry after some of the variables read have changed.

Type Aliases§

  • Type returned by STM methods that cannot be aborted, the only reason they can fail is to be retried.
  • Type returned by STM methods that can be aborted with an error.