User-managed thread infrastructure.
More...
Detailed Description
User-managed thread infrastructure.
Core feature that allows users to provide the threads to the DDS middleware.
::DDS_ThreadFactory
The model follows the abstract factory pattern. A DDS_ThreadFactory instance can be set in the DDS_DomainParticipantFactory so that DDS_DomainParticipant will use it for thread creation and deletion.
Macro Definition Documentation
#define DDS_ThreadFactory_INITIALIZER |
Typedef Documentation
typedef void*(* DDS_ThreadFactory_OnSpawnedFunction)(void *thread_param) |
Prototype of the function that must be called on a new thread created by a DDS_ThreadFactory.
- Parameters
-
thread_params | <<in>> Single argument that this operation receives. It is the data this operation needs to perform. |
Prototype of a DDS_ThreadFactory create_thread function.
- Parameters
-
factory_data | <<in>> Data associated with the factory when the factory is set. |
thread_name | <<in>> Name of the thread given by the middleware. |
thread_settings | <<in>> Attributes of the new thread (i.e., priority, stack size, etc.). These attributes are specified in the QoS settings corresponding to each kind of thread (i.e., database, event, etc). |
on_spawned | <<in>> Function provided by the middleware to be called in the newly created thread. |
thread_params | <<in>> Parameters provided by the middleware to be passed in the call to on_spawned. |
- Returns
- An opaque pointer to the newly created thread. The same pointer will be provided to the DDS_ThreadFactory::delete_thread operation when deletion is requested.
typedef void(* DDS_ThreadFactory_DeleteThreadCallback)(void *factory_data, void *thread) |
Prototype of a DDS_ThreadFactory delete_thread function.
- Parameters
-
factory_data | <<in>> Data associated with the factory when the factory is set. |
thread | <<in>> Thread to be deleted. The thread was previously created by the same DDS_ThreadFactory. |