#include <ThreadSynchResource.h>
Inheritance diagram for OpenDDS::DCPS::ThreadSynchResource:
Public Member Functions | |
virtual | ~ThreadSynchResource () |
virtual int | wait_to_unclog () |
Protected Member Functions | |
virtual void | notify_lost_on_backpressure_timeout ()=0 |
ThreadSynchResource (ACE_HANDLE handle) | |
Protected Attributes | |
ACE_HANDLE | handle_ |
ACE_Time_Value * | timeout_ |
Definition at line 17 of file ThreadSynchResource.h.
OpenDDS::DCPS::ThreadSynchResource::~ThreadSynchResource | ( | ) | [virtual] |
Definition at line 15 of file ThreadSynchResource.cpp.
References DBG_ENTRY_LVL, and timeout_.
00016 { 00017 DBG_ENTRY_LVL("ThreadSynchResource","~ThreadSynchResource",6); 00018 delete this->timeout_; 00019 }
ACE_INLINE OpenDDS::DCPS::ThreadSynchResource::ThreadSynchResource | ( | ACE_HANDLE | handle | ) | [protected] |
Definition at line 12 of file ThreadSynchResource.inl.
References DBG_ENTRY_LVL.
00013 : handle_(handle), 00014 timeout_(0) 00015 { 00016 DBG_ENTRY_LVL("ThreadSynchResource","ThreadSynchResource",6); 00017 }
virtual void OpenDDS::DCPS::ThreadSynchResource::notify_lost_on_backpressure_timeout | ( | ) | [protected, pure virtual] |
ACE_INLINE int OpenDDS::DCPS::ThreadSynchResource::wait_to_unclog | ( | ) | [virtual] |
Definition at line 20 of file ThreadSynchResource.inl.
References DBG_ENTRY_LVL, and notify_lost_on_backpressure_timeout().
Referenced by OpenDDS::DCPS::ThreadSynch::wait_on_clogged_resource().
00021 { 00022 DBG_ENTRY_LVL("ThreadSynchResource","wait_to_unclog",6); 00023 00024 if (ACE::handle_write_ready(this->handle_, this->timeout_) == -1) { 00025 if (errno == ETIME) { 00026 ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: handle_write_ready timed out\n")); 00027 this->notify_lost_on_backpressure_timeout(); 00028 00029 } else { 00030 ACE_ERROR((LM_ERROR, 00031 "(%P|%t) ERROR: ACE::handle_write_ready return -1 while waiting " 00032 " to unclog. %p \n", ACE_TEXT("handle_write_ready"))); 00033 } 00034 00035 return -1; 00036 } 00037 00038 return 0; 00039 }
ACE_HANDLE OpenDDS::DCPS::ThreadSynchResource::handle_ [protected] |
Definition at line 29 of file ThreadSynchResource.h.
ACE_Time_Value* OpenDDS::DCPS::ThreadSynchResource::timeout_ [protected] |
Definition at line 30 of file ThreadSynchResource.h.
Referenced by OpenDDS::DCPS::TcpSynchResource::TcpSynchResource(), and ~ThreadSynchResource().