RTI Connext Modern C++ API Version 7.3.0
rti::core::ThreadSettings Class Reference

<<extension>> The properties of a thread of execution. More...

#include <rti/core/ThreadSettings.hpp>

Public Member Functions

 ThreadSettings ()
 Creates the default thread settings. More...
 
 ThreadSettings (ThreadSettingsKindMask the_mask, int32_t the_priority, int32_t the_stack_size, dds::core::vector< int32_t > the_cpu_list, ThreadSettingsCpuRotationKind::type the_cpu_rotation)
 Creates an instance with all the specified parameters. More...
 
ThreadSettingsKindMask mask () const
 Getter (see setter with the same name) More...
 
ThreadSettingsmask (ThreadSettingsKindMask the_mask)
 Describes the type of thread. More...
 
int32_t priority () const
 Getter (see setter with the same name) More...
 
ThreadSettingspriority (int32_t the_priority)
 Thread priority. More...
 
int32_t stack_size () const
 Getter (see setter with the same name) More...
 
ThreadSettingsstack_size (int32_t the_stack_size)
 The thread stack-size. More...
 
dds::core::vector< int32_t > cpu_list () const
 Getter (see setter with the same name) More...
 
ThreadSettingscpu_list (const dds::core::vector< int32_t > &the_cpu_list)
 The list of processors on which the thread(s) may run. More...
 
ThreadSettingsCpuRotationKind cpu_rotation () const
 Getter (see setter with the same name) More...
 
ThreadSettingscpu_rotation (ThreadSettingsCpuRotationKind the_cpu_rotation)
 Determines how processor affinity is applied to multiple threads. More...
 

Detailed Description

<<extension>> The properties of a thread of execution.

Consult Platform Notes for additional platform specific details.

QoS:
rti::core::policy::Event rti::core::policy::Database rti::core::policy::ReceiverPool rti::core::policy::AsynchronousPublisher

Constructor & Destructor Documentation

◆ ThreadSettings() [1/2]

rti::core::ThreadSettings::ThreadSettings ( )
inline

Creates the default thread settings.

◆ ThreadSettings() [2/2]

rti::core::ThreadSettings::ThreadSettings ( ThreadSettingsKindMask  the_mask,
int32_t  the_priority,
int32_t  the_stack_size,
dds::core::vector< int32_t >  the_cpu_list,
ThreadSettingsCpuRotationKind::type  the_cpu_rotation 
)

Creates an instance with all the specified parameters.

Member Function Documentation

◆ mask() [1/2]

ThreadSettingsKindMask rti::core::ThreadSettings::mask ( ) const

Getter (see setter with the same name)

◆ mask() [2/2]

ThreadSettings & rti::core::ThreadSettings::mask ( ThreadSettingsKindMask  the_mask)

Describes the type of thread.

The meaning of each bit of the mask are defined by rti::core::ThreadSettingsKindMask.

[default] 0, use default options of the OS

◆ priority() [1/2]

int32_t rti::core::ThreadSettings::priority ( ) const

Getter (see setter with the same name)

◆ priority() [2/2]

ThreadSettings & rti::core::ThreadSettings::priority ( int32_t  the_priority)

Thread priority.

[range] Platform-dependent - Consult Platform Notes for additional details.

◆ stack_size() [1/2]

int32_t rti::core::ThreadSettings::stack_size ( ) const

Getter (see setter with the same name)

◆ stack_size() [2/2]

ThreadSettings & rti::core::ThreadSettings::stack_size ( int32_t  the_stack_size)

The thread stack-size.

[range] Platform-dependent. Consult Platform Notes for additional details.

◆ cpu_list() [1/2]

dds::core::vector< int32_t > rti::core::ThreadSettings::cpu_list ( ) const

Getter (see setter with the same name)

◆ cpu_list() [2/2]

ThreadSettings & rti::core::ThreadSettings::cpu_list ( const dds::core::vector< int32_t > &  the_cpu_list)

The list of processors on which the thread(s) may run.

A sequence of integers that represent the set of processors on which the thread(s) controlled by this QoS may run. An empty sequence (the default) means the middleware wlll make no CPU affinity adjustments.

Note: This feature is currently only supported on a subset of architectures (see the Platform Notes). The API may change as more architectures are added in future releases.

This value is only relevant to the rti::core::policy::ReceiverPool. It is ignored within other QoS policies that include rti::core::ThreadSettings.

See also
Controlling CPU Core Affinity for RTI Threads

[default] Empty sequence

◆ cpu_rotation() [1/2]

ThreadSettingsCpuRotationKind rti::core::ThreadSettings::cpu_rotation ( ) const

Getter (see setter with the same name)

◆ cpu_rotation() [2/2]

ThreadSettings & rti::core::ThreadSettings::cpu_rotation ( ThreadSettingsCpuRotationKind  the_cpu_rotation)

Determines how processor affinity is applied to multiple threads.

This value is only relevant to the rti::core::policy::ReceiverPool. It is ignored within other QoS policies that include rti::core::ThreadSettings.

See also
Controlling CPU Core Affinity for RTI Threads

Note: This feature is currently only supported on a subset of architectures (see the Platform Notes). The API may change as more architectures are added in future releases.