24 , allow_dispatch_(true)
25 , stop_when_empty_(false)
28 , max_timer_id_(LONG_MAX)
29 , pool_(count, run, this)
48 ACE_ERROR((
LM_ERROR,
"(%P|%t) ERROR :: DispatchService::shutdown: Contained Thread Attempting To Call Shutdown.\n"));
64 for (TimerQueueMap::const_iterator it = cmap.begin(), limit = cmap.end(); it != limit; ++it) {
65 pending->push_back(it->second.first);
98 TimerQueueMap::iterator pos =
timer_queue_map_.insert(std::make_pair(expiration, std::make_pair(std::make_pair(fun, arg), 0)));
103 if (
id == starting_id) {
106 pos->second.second = id;
107 }
while (
timer_id_map_.insert(std::make_pair(
id, pos)).second ==
false);
123 *arg = pos->second->second.first.second;
138 if (it->second.first.first == fun && it->second.first.second == arg) {
175 TimerQueueMap::iterator last =
timer_queue_map_.upper_bound(now), pos = last;
203 pair.first(pair.second);
ConditionVariable< ACE_Thread_Mutex > cv_
size_t cancel(TimerId id, void **arg=0)
long TimerId
Typedef for Schedule Return Values.
bool notify_one()
Unblock one of the threads waiting on this condition.
#define OPENDDS_ASSERT(C)
std::pair< FunPtr, void * > FunArgPair
static const long TI_FAILURE
TimerId Failure Constant.
static const bool DS_ERROR
DispatchStatus Error Constant.
static ACE_THR_FUNC_RETURN run(void *arg)
static TimePoint_T< MonotonicClock > now()
bool contains(ACE_thread_t id) const
DispatchStatus dispatch(FunPtr fun, void *arg=0)
static ACE_thread_t self(void)
virtual ~DispatchService()
bool DispatchStatus
Typedef for Dispatch Return Values.
TimerQueueMap timer_queue_map_
DispatchService(size_t count=1)
TimerId schedule(FunPtr fun, void *arg=0, const MonotonicTimePoint &expiration=MonotonicTimePoint::now())
bool notify_all()
Unblock all of the threads waiting on this condition.
CvStatus wait(ThreadStatusManager &thread_status_manager)
Block until thread is woken up.
OpenDDS_Dcps_Export LogLevel log_level
CvStatus wait_until(const MonotonicTimePoint &expire_at, ThreadStatusManager &thread_status_manager)
Block until woken up or until expire_at. Same as wait() if expire_at is zero.
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
void shutdown(bool immediate=false, EventQueue *pending=0)
static const bool DS_SUCCESS
DispatchStatus Success Constant.
#define TheServiceParticipant
The Internal API and Implementation of OpenDDS.