RTI Connext Modern C++ API Version 7.7.0
rti::core::cond::AsyncWaitSetProperty Class Reference

Specifies the rti::core::cond::AsyncWaitSet behavior. More...

#include <rti/core/cond/AsyncWaitSet.hpp>

Public Member Functions

 AsyncWaitSetProperty ()
 Creates the default property. More...
 
 AsyncWaitSetProperty (rti::core::cond::WaitSetProperty &the_waitset_property, dds::core::Duration &the_wait_timeout, int32_t the_level, const std::string &the_thread_name_prefix, rti::core::ThreadSettings &the_thread_settings, int32_t the_thread_pool_size)
 Creates an instance with all the specified parameters. More...
 
rti::core::cond::WaitSetProperty waitset_property () const
 Getter (see setter with the same name) More...
 
AsyncWaitSetProperty & waitset_property (rti::core::cond::WaitSetProperty &the_waitset_property)
 Specifies the behavior of the asynchronous wait behavior, which is equivalent to the wait mechanism of a dds::core::cond::WaitSet. More...
 
dds::core::Duration wait_timeout () const
 Getter (see setter with the same name) More...
 
AsyncWaitSetProperty & wait_timeout (dds::core::Duration &the_wait_timeout)
 Asynchronous wait timeout. More...
 
int32_t level () const
 Getter (see setter with the same name) More...
 
AsyncWaitSetProperty & level (int32_t the_level)
 Specifies the level of an rti::core::cond::AsyncWaitSet. More...
 
const std::string thread_name_prefix () const
 Getter (see setter with the same name) More...
 
AsyncWaitSetProperty & thread_name_prefix (const std::string &thr_thread_name_prefix)
 Prefix used to compose the name of each thread that comprises the thread pool of the rti::core::cond::AsyncWaitSet. More...
 
rti::core::ThreadSettings thread_settings () const
 Getter (see setter with the same name) More...
 
AsyncWaitSetProperty & thread_settings (rti::core::ThreadSettings &the_thread_settings)
 rti::core::ThreadSettings for each thread comprising the thread pool of the rti::core::cond::AsyncWaitSet. More...
 
int32_t thread_pool_size () const
 Getter (see setter with the same name) More...
 
AsyncWaitSetProperty & thread_pool_size (int32_t the_level)
 Number of threads that comprise the thread pool of the rti::core::cond::AsyncWaitSet. More...
 

Detailed Description

Specifies the rti::core::cond::AsyncWaitSet behavior.

This property allows configuring the behavior of the asynchronous wait and the dds::core::cond::Condition dispatch, as well as the parameters of the thread pool.

See also
rti::core::cond::WaitSetProperty
rti::core::ThreadSettings

Constructor & Destructor Documentation

◆ AsyncWaitSetProperty() [1/2]

rti::core::cond::AsyncWaitSetProperty::AsyncWaitSetProperty ( )
inline

Creates the default property.

The default value for each field is documented in its corresponding setter.

◆ AsyncWaitSetProperty() [2/2]

rti::core::cond::AsyncWaitSetProperty::AsyncWaitSetProperty ( rti::core::cond::WaitSetProperty &  the_waitset_property,
dds::core::Duration &  the_wait_timeout,
int32_t  the_level,
const std::string &  the_thread_name_prefix,
rti::core::ThreadSettings &  the_thread_settings,
int32_t  the_thread_pool_size 
)

Creates an instance with all the specified parameters.

Member Function Documentation

◆ waitset_property() [1/2]

rti::core::cond::WaitSetProperty rti::core::cond::AsyncWaitSetProperty::waitset_property ( ) const

Getter (see setter with the same name)

◆ waitset_property() [2/2]

AsyncWaitSetProperty & rti::core::cond::AsyncWaitSetProperty::waitset_property ( rti::core::cond::WaitSetProperty &  the_waitset_property)

Specifies the behavior of the asynchronous wait behavior, which is equivalent to the wait mechanism of a dds::core::cond::WaitSet.

See also
rti::core::cond::WaitSetProperty

◆ wait_timeout() [1/2]

dds::core::Duration rti::core::cond::AsyncWaitSetProperty::wait_timeout ( ) const

Getter (see setter with the same name)

◆ wait_timeout() [2/2]

AsyncWaitSetProperty & rti::core::cond::AsyncWaitSetProperty::wait_timeout ( dds::core::Duration &  the_wait_timeout)

Asynchronous wait timeout.

Specifies the maximum amount of time the leader thread of the rti::core::cond::AsyncWaitSet waits for an attached dds::core::cond::Condition to trigger before it wakes up.

Duration must be a value greater than zero.

See also
dds::core::cond::WaitSet::wait

[default] dds::core::Duration::infinite()

◆ level() [1/2]

int32_t rti::core::cond::AsyncWaitSetProperty::level ( ) const

Getter (see setter with the same name)

◆ level() [2/2]

AsyncWaitSetProperty & rti::core::cond::AsyncWaitSetProperty::level ( int32_t  the_level)

Specifies the level of an rti::core::cond::AsyncWaitSet.

The level prevents an application to deadlock when it uses multiple rti::core::cond::AsyncWaitSet instances that call operations on each other from the context of one of their thread pool's thread.

Inside the context of one of these threads, the application can synchronize only with other rti::core::cond::AsyncWaitSet of bigger level.

[default] 1

◆ thread_name_prefix() [1/2]

const std::string rti::core::cond::AsyncWaitSetProperty::thread_name_prefix ( ) const

Getter (see setter with the same name)

◆ thread_name_prefix() [2/2]

AsyncWaitSetProperty & rti::core::cond::AsyncWaitSetProperty::thread_name_prefix ( const std::string &  thr_thread_name_prefix)

Prefix used to compose the name of each thread that comprises the thread pool of the rti::core::cond::AsyncWaitSet.

The composed name has the form:

thread_name_prefix##[index]AWs where [index] is an integer that identifies the thread relative to the rti::core::cond::AsyncWaitSet.

If the string is empty, the default prefix will be used.

[default] Empty string (use default prefix)

◆ thread_settings() [1/2]

rti::core::ThreadSettings rti::core::cond::AsyncWaitSetProperty::thread_settings ( ) const

Getter (see setter with the same name)

◆ thread_settings() [2/2]

AsyncWaitSetProperty & rti::core::cond::AsyncWaitSetProperty::thread_settings ( rti::core::ThreadSettings &  the_thread_settings)

rti::core::ThreadSettings for each thread comprising the thread pool of the rti::core::cond::AsyncWaitSet.

Each thread within the pool is created with the same settings.

[default] Default thread settings values.

See also
rti::core::ThreadSettings

◆ thread_pool_size() [1/2]

int32_t rti::core::cond::AsyncWaitSetProperty::thread_pool_size ( ) const

Getter (see setter with the same name)

◆ thread_pool_size() [2/2]

AsyncWaitSetProperty & rti::core::cond::AsyncWaitSetProperty::thread_pool_size ( int32_t  the_level)

Number of threads that comprise the thread pool of the rti::core::cond::AsyncWaitSet.

Size must be equal to or greater than one.

[default] 1