| 13 | namespace DCPS { |
| 14 | |
| 15 | void 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 | |
| 31 | void MultiTask::enable_i(const TimeDuration& per, |
| 32 | ReactorWrapper& reactor_wrapper) |
nothing calls this directly
no test coverage detected