MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / enable

Method enable

dds/DCPS/MultiTask.cpp:15–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace DCPS {
14
15void MultiTask::enable(const TimeDuration& delay)
16{
17 bool worth_passing_along = false;
18 {
19 ACE_Guard<ACE_Thread_Mutex> guard(mutex_);
20 worth_passing_along = (timer_ == ReactorWrapper::InvalidTimerId) ||
21 ((MonotonicTimePoint::now() + delay + cancel_estimate_) < next_time_);
22 }
23 if (worth_passing_along) {
24 ReactorTask_rch reactor_task = reactor_task_.lock();
25 if (reactor_task) {
26 reactor_task->execute_or_enqueue(make_rch<ScheduleEnableCommand>(rchandle_from(this), delay));
27 }
28 }
29}
30
31void MultiTask::enable_i(const TimeDuration& per,
32 ReactorWrapper& reactor_wrapper)

Callers

nothing calls this directly

Calls 3

rchandle_fromFunction · 0.85
execute_or_enqueueMethod · 0.80
lockMethod · 0.45

Tested by

no test coverage detected