Threading

Thread manipulation and synchronization.

Classes

  • SpinLock — Synchronization primitive with low overhead.
  • ScopedSpinLock — Provides a safer method for locking a spin lock as the lock will get automatically locked when this objected is created and unlocked as soon as it goes out of scope.
  • ThreadCoreMask — Contains one or multiple logical CPU cores that a thread can run on.
  • ThreadAffinityPolicy — Assigns thread affinities to threads according to a particular policy.
  • AnyOfThreadAffinityPolicy — Policy that returns affinity that allows a thread to execute on any of the cores provided to the policy.
  • OneOfThreadAffinityPolicy — Policy that returns an affinity that pins a thread to a single core.
  • Thread — Wrapper for an OS thread.
  • SchedulerTask — Represents a function to execute using the Scheduler.
  • Fiber — Fibers are light-weight alternatives to threads that allow for cooperative multitasking.
  • SchedulerThread — Represents a single worker thread within Scheduler.
  • Scheduler — Allows the caller to post tasks which will then be executed on one of the threads managed by the scheduler.
  • Signal — Similar to std::condition_variable, but also works with fibers in a way that allows waiting fibers to yield rather than blocking the thread.
  • AsyncOp — Common base for all TAsyncOp specializations.
  • TAsyncOp — Object you may use to check on the results of an asynchronous operation.
  • PooledThread — Wrapper around a thread that is used within ThreadPool.
  • TPooledThread — Wrapper around a thread that is used within ThreadPool.
  • ThreadPool — Class that maintains a pool of threads we can easily retrieve and use for any task.

Structs

Enums

Internal

Symbols intended for engine-internal use. Not part of the public API.

Classes

  • ThreadNoPolicy — Policy used for thread start & end used by the ThreadPool.
  • TThreadPool — Class that maintains a pool of threads we can easily retrieve and use for any task.

Structs

  • SchedulerThread::WaitingFibers Contains all fibers waiting for a timeout.
  • SchedulerThread::WaitingFibers::WaitingFiber — Contains information about a waiting fiber.
  • detail::NullMutex — No-op mutex for ThreadUnsafe events.
  • detail::NullLock — No-op RAII lock guard for ThreadUnsafe events.
  • AsyncOpEmpty — Flag used for creating async operations signaling that we want to create an empty AsyncOp with no internal memory storage.
  • AsyncOpDataBase — Base structure for AsyncOp data storage.
  • TAsyncOpData — Typed data structure that stores the return value inline.

Enums

  • Fiber::State — Describes the state a fiber may be in.