Loading...
Searching...
No Matches
WorkIsolatingDispatcher Class Reference

The isolating work dispatcher is a specialization of WorkDispatcher, mirroring its public API and documented behaviors. More...

#include <isolatingDispatcher.h>

Inherits Work_Dispatcher< Impl >, and Work_Dispatcher< PXR_WORK_IMPL_NS::WorkImpl_Dispatcher >.

Detailed Description

The isolating work dispatcher is a specialization of WorkDispatcher, mirroring its public API and documented behaviors.

However, the WorkIsolatingDispatcher imposes additional restrictions on how it processes its concurrent tasks: Tasks added to the dispatcher will only be run by this dispatcher, or nested instances of non-isolating WorkDispatcher. Moreover, in its Wait() method, the WorkIsolatingDispatcher will not run tasks that were not originally added to this dispatcher, or one of its nested, non-isolating WorkDispatcher instances.

For work implementations that support work stealing (e.g., OneTBB) the WorkIsolatingDispatcher effectively prevents unrelated tasks from being stolen by this dispatcher, as well as dispatcher tasks being stolen by unrelated parallel constructs (unless they are non-isolating and nested within one of the tasks of this dispatcher).

Note
Enforcing the work stealing prevention behavior of the WorkIsolatingDispatcher carries significant additional cost. Using the WorkDispatcher is preferred in most cases, unless the isolation behavior is required, and the scoping semantics of WorkWithScopedParallelism() are insufficient for the particular use-case.

For more information, refer to the documentation for WorkDispatcher.

Definition at line 47 of file isolatingDispatcher.h.


The documentation for this class was generated from the following file: