A class to wait on acknowledgments from other threads. More...
#include <Sedp.h>

Public Member Functions | |
| WaitForAcks () | |
| void | ack () |
| void | wait_for_acks (unsigned int num_acks) |
| void | reset () |
Private Attributes | |
| ACE_Thread_Mutex | lock_ |
| ACE_Condition_Thread_Mutex | cond_ |
| unsigned int | acks_ |
A class to wait on acknowledgments from other threads.
Definition at line 665 of file Sedp.h.
| OpenDDS::RTPS::WaitForAcks::WaitForAcks | ( | ) |
| void OpenDDS::RTPS::WaitForAcks::ack | ( | ) |
Definition at line 4122 of file Sedp.cpp.
References acks_, cond_, lock_, and ACE_Condition< ACE_Thread_Mutex >::signal().
Referenced by OpenDDS::RTPS::Spdp::SpdpTransport::handle_exception(), and OpenDDS::RTPS::Sedp::Task::svc().
04123 { 04124 { 04125 ACE_GUARD(ACE_Thread_Mutex, g, lock_); 04126 ++acks_; 04127 } 04128 cond_.signal(); 04129 }


| void OpenDDS::RTPS::WaitForAcks::reset | ( | void | ) |
Definition at line 4141 of file Sedp.cpp.
Referenced by OpenDDS::RTPS::Spdp::fini_bit().
04142 { 04143 ACE_GUARD(ACE_Thread_Mutex, g, lock_); 04144 acks_ = 0; 04145 // no need to signal, going back to zero won't ever 04146 // cause wait_for_acks() to exit it's loop 04147 }

| void OpenDDS::RTPS::WaitForAcks::wait_for_acks | ( | unsigned int | num_acks | ) |
Definition at line 4132 of file Sedp.cpp.
References acks_, cond_, lock_, and ACE_Condition< ACE_Thread_Mutex >::wait().
Referenced by OpenDDS::RTPS::Spdp::fini_bit().
04133 { 04134 ACE_GUARD(ACE_Thread_Mutex, g, lock_); 04135 while (num_acks > acks_) { 04136 cond_.wait(); 04137 } 04138 }


unsigned int OpenDDS::RTPS::WaitForAcks::acks_ [private] |
Definition at line 674 of file Sedp.h.
Referenced by ack(), reset(), and wait_for_acks().
Definition at line 673 of file Sedp.h.
Referenced by ack(), and wait_for_acks().
Definition at line 672 of file Sedp.h.
Referenced by ack(), reset(), and wait_for_acks().
1.6.1