| 72 | } |
| 73 | |
| 74 | DispatchService::DispatchStatus DispatchService::dispatch(FunPtr fun, void* arg) |
| 75 | { |
| 76 | if (!fun) { |
| 77 | return DS_ERROR; |
| 78 | } |
| 79 | |
| 80 | ACE_Guard<ACE_Thread_Mutex> guard(mutex_); |
| 81 | if (allow_dispatch_) { |
| 82 | event_queue_.push_back(std::make_pair(fun, arg)); |
| 83 | cv_.notify_one(); |
| 84 | return DS_SUCCESS; |
| 85 | } |
| 86 | return DS_ERROR; |
| 87 | } |
| 88 | |
| 89 | DispatchService::TimerId DispatchService::schedule(FunPtr fun, void* arg, const MonotonicTimePoint& expiration) |
| 90 | { |
no test coverage detected