tasking#

Fully qualified name: carb::tasking

namespace tasking#

Namespace for carb.tasking.plugin and related utilities.

Classes#

ConditionVariable

A fiber-aware condition_variable: a synchronization primitive that, together with a Mutex , blocks one or more threads or tasks until a condition becomes true.

ConditionVariableWrapper

Wrapper for carb::tasking::ConditionVariable .

Counter

Used to create dependencies between tasks and to wait for a set of tasks to finish.

CounterWrapper

Wrapper for a carb::tasking::Counter .

Delegate

Delegate< void(Args…)>

Implements a task-aware, task-safe callback system that can have multiple subscribers.

DelegateRef

DelegateRef< void(Args…)>

Holds a reference to a Delegate .

Future

A Future is a counterpart to a Promise .

Mutex

A fiber-aware mutex: a synchronization primitive for mutual exclusion.

MutexWrapper

Wrapper for a carb::tasking::Mutex that conforms to C++ Named Requirements of Lockable .

PinGuard

Causes the currently executing TaskContext to be "pinned" to the thread it is currently running on until PinGuard is destroyed.

Promise

A facility to store a value that is later acquired asynchronously via a Future created via Promise::get_future() .

RecursiveMutexWrapper

Wrapper for a recursive carb::tasking::Mutex that conforms to C++ Named Requirements of Lockable .

ScopedTracking

When instantiated, begins tracking the passed Trackers .

Semaphore

A fiber-aware semaphore: a synchronization primitive that limits to N threads/fibers.

SemaphoreWrapper

Wrapper for a carb::tasking::Semaphore .

SharedFuture

SharedFuture is a shareable version of Future .

SharedMutex

A fiber-aware shared_mutex: a synchronization primitive that functions as a multiple-reader/single-writer lock.

SharedMutexWrapper

Wrapper for a carb::tasking::SharedMutex that (mostly) conforms to C++ Named Requirements of SharedMutex .

Split_t

An empty type used to invoke splitting constructors.

TaskGroup

TaskGroup is a small and fast counter for tasks.

ThreadPool

Opaque handle for a thread pool.

ThreadPoolWrapper

Helper class for using IThreadPool API.

Enumerations#

ObjectType

Object type for Object .

Priority

Defines a task priority.

TaskDebugState

Debug state of a task.

Functions#

TaskingDesc getDefaultTaskingDesc()

Default TaskingDesc plugin starts with.

inline ::std::enable_if_t< detail::IsRandomAccess_v< RandomAccessIterator > > parallelSort(ITasking *tasking, RandomAccessIterator first, RandomAccessIterator last)

Performs a parallel sort on the given data.

inline ::std::enable_if_t< detail::IsRandomAccess_v< RandomAccessIterator > > parallelSort(ITasking *tasking, RandomAccessIterator first, RandomAccessIterator last, const Compare &comp)

Performs a parallel sort on the given data.

Structs#

All

Specifies an "all" grouping of RequiredObject(s).

Any

Specifies an "any" grouping of RequiredObject(s).

IFiberEvents

Defines the fiber events interface that receives fiber-related notifications.

ITasking

Defines a tasking plugin interface, acquired with carb::Framework::acquireInterface() when carb.tasking.plugin is loaded.

IThreadPool

Optional plugin providing helpful facilities for utilizing a pool of threads to perform basic small tasks.

Object

A generic.

RefFromDelegate

A helper class for determining the type of a carb::tasking::DelegateRef based on a carb::tasking::Delegate .

RequiredObject

Helper class to ensure correct compliance with the requiredObject parameter of ITasking::add[Throttled]SubTask() and wait() functions.

SpinMutex

This atomic spin lock conforms to C++ Named Requirements of Lockable which makes it compatible with std::lock_guard.

SpinSharedMutex

Spin lock conforming to C++ named requirements of SharedMutex .

TaskDebugInfo

Defines debug information about a task retrieved by ITasking::getTaskDebugInfo() or ITasking::walkTaskDebugInfo() .

TaskDesc

Defines a task descriptor.

TaskingDesc

Defines a tasking plugin descriptor.

Tracker

Helper class to provide correct types to the Trackers class.

Trackers

Helper class to ensure correct compliance with trackers parameter of ITasking::addTask() variants.

Typedefs#

ApplyBatchFn

The function executed by ITasking::applyRangeBatch()

ApplyFn

The function executed by ITasking::applyRange()

JobFn

Defines the function for performing a user-provided job.

OnTaskFn

The function to execute as a task.

RefFromDelegate_t

Definition helper for RefFromDelegate<Del>::type

TaskContext

An opaque handle that is used with getTaskContext(), suspendTask() and wakeTask().

TaskDebugInfoFn

Callback function for ITasking::walkTaskDebugInfo() .

TaskStorageDestructorFn

A destructor function for a Task Storage slot.

TaskStorageKey

An opaque handle representing a Task Storage slot.

Variables#

constexpr Split_t Split

An instantiation of Split_t .

constexpr uint64_t kInfinite

A constant for ITasking wait functions indicating "infinite" timeout.

constexpr TaskContext kInvalidTaskContext

A specific value for TaskContext that indicates a non-valid TaskContext.

constexpr TaskStorageKey kInvalidTaskStorageKey

Represents an invalid TaskStorageKey.

constexpr uint32_t kMaxFibers

Historically, the absolute maximum number of fibers that ITasking will create.