| 30 | } |
| 31 | |
| 32 | void SporadicTask::schedule_i(const MonotonicTimePoint& next_time, |
| 33 | const TimeDuration& delay) |
| 34 | { |
| 35 | { |
| 36 | ACE_Guard<ACE_Thread_Mutex> guard(mutex_); |
| 37 | if (!desired_scheduled_ || next_time < desired_next_time_) { |
| 38 | desired_scheduled_ = true; |
| 39 | desired_next_time_ = next_time; |
| 40 | desired_delay_ = delay; |
| 41 | } else { |
| 42 | return; |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | const ReactorTask_rch reactor_task = reactor_task_.lock(); |
| 47 | if (reactor_task) { |
| 48 | reactor_task->execute_or_enqueue(sporadic_command_); |
| 49 | } else if (log_level >= LogLevel::Error) { |
| 50 | ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: SporadicTask::schedule_i: " |
| 51 | "failed to receive ReactorTask handle\n")); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | void SporadicTask::cancel() |
| 56 | { |
nothing calls this directly
no test coverage detected