RobWorkProject
24.12.4-
|
Utility functions related to the use of Open Dynamics Engine from multiple threads. More...
#include <ODEThreading.hpp>
Static Public Member Functions | |
static void | assertSupported () |
Make sure that threading is supported. More... | |
static bool | isSupported () |
Check if threading is supported. More... | |
static void | checkSecureStepBegin () |
If multiple threads try to execute dWorldStep or dWorldQuickStep simultaneously, they should call this before each step, followed by checkSecureStepEnd() after the step. This will give user-friendly errors if threading is not supported. More... | |
static void | checkSecureStepEnd () |
Call this after all dWorldStep and dWorldQuickStep. More... | |
static void | initThreading (dWorldID world) |
Initialize threading structures (only used in ODE 0.13 and newer). More... | |
static void | destroyThreading (dWorldID world) |
Destruct threading structures. More... | |
Utility functions related to the use of Open Dynamics Engine from multiple threads.
For version 0.12 and earlier, using ODE from multiple threads might work (there is no guarantees).
In version 0.13 a new structure for multi-threading was introduced. Open Dynamics Engine must be compiled with the flags –enable-builtin-threading-impl and –enable-ou. This is required to support multi-threading in ODE 0.13 and newer.
|
static |
Make sure that threading is supported.
Exception | if Open Dynamics Engine does not support threading. |
|
static |
If multiple threads try to execute dWorldStep or dWorldQuickStep simultaneously, they should call this before each step, followed by checkSecureStepEnd() after the step. This will give user-friendly errors if threading is not supported.
Exception | if threading is not supported and this has been called more than once. |
|
static |
Call this after all dWorldStep and dWorldQuickStep.
|
static |
Destruct threading structures.
world | [in] the world id. |
|
static |
Initialize threading structures (only used in ODE 0.13 and newer).
Notice that this will create a worker thread for each world.
world | [in] the world id. |
|
static |
Check if threading is supported.
The function will return false for ODE 0.13 and newer if ODE is compiled without the –enable-builtin-threading-impl option.