1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #ifndef _FASTDDS_RTPS_RESOURCES_ASYNC_INTEREST_TREE_H_
- #define _FASTDDS_RTPS_RESOURCES_ASYNC_INTEREST_TREE_H_
- #include <fastrtps/rtps/writer/RTPSWriter.h>
- #include <mutex>
- #include <set>
- namespace eprosima {
- namespace fastrtps {
- namespace rtps {
- class AsyncInterestTree
- {
- friend class AsyncWriterThread;
- public:
-
- bool register_interest(
- RTPSWriter* writer);
-
- bool register_interest(
- RTPSWriter* writer,
- const std::chrono::time_point<std::chrono::steady_clock>& max_blocking_time);
-
- bool unregister_interest(
- RTPSWriter* writer);
-
- void swap();
-
- RTPSWriter* next_active_nts();
- private:
- bool register_interest_nts(
- RTPSWriter* writer);
- mutable std::timed_mutex mMutexActive, mMutexHidden;
- RTPSWriter* active_front_ = nullptr;
- RTPSWriter* hidden_front_ = nullptr;
- int active_pos_ = 0;
- int hidden_pos_ = 1;
- };
- }
- }
- }
- #endif
|