Adding a std::thread-based ReadCondition to a Waitset (C++)

I am writing a (modern C++) module to simulate a device that connects to a central registry to send and obtain information.  The registry and device each pass data both ways, so act as both subscribers and publishers.


Use of multiple WaitSets in one application?


Many applcations in our system use WaitSets to detect various DDS conditions, and react accordingly.  At this stage, most, if not all, use a single WaitSet.

Are there any performance issues that one should be aware of before introducing a second WaitSet, with a different set of conditions attached, into an application?

My initial guess is that the extra WaitSet would mean at least one extra thread in the application.  But is there anything else?

Thanks in advance



Subscriber dropping samples (can't keep up ?)

I have a publisher/subscriber pair (created using  DDSTheParticipantFactory->create_participant_from_config). The subscriber uses a dynamic reader and waits on DDS_DATA_AVAILABLE_STATUS to receive new data from the publisher. At publication rates of > around 5 Hz, the subscriber begins to "miss" new samples, getting worse as the publication rate is increased. It will typically go for 1 - 3 seconds without seeing new samples, then receive a short burst (2 - 10) of consecutive samples, and repeat this cycle.


AccessViolationException on program shutdown


I'm encountering the following unhandled exception in nddsdotnet40.dll when my application shuts down:

System.AccessViolationException was unhandled
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at DDS.WaitSet.!WaitSet()
at DDS.WaitSet.Dispose(Boolean )
at DDS.WaitSet.Finalize()

I've traced through all my Dispose() methods and it doesn't seem that anything is directly causing this exception.


Proper use of WaitSets and Conditions

I have noticed in our support forums a common question regarding the use of WaitSets and the fact that sometimes they don't behave as people initially expect. Often the question is posed along the lines of "Why does my WaitSet not block? Why does my subscriber using WaitSets consume so much CPU?

Subscribe to RSS - WaitSet