| 448 | } |
| 449 | |
| 450 | void ReactorTask::process_command_queue_i() |
| 451 | { |
| 452 | Queue cq; |
| 453 | ACE_Reverse_Lock<ACE_Thread_Mutex> rev_lock(lock_); |
| 454 | |
| 455 | processing_ = true; |
| 456 | if (!command_queue_.empty()) { |
| 457 | cq.swap(command_queue_); |
| 458 | // The current notification is being processed, reset to allow a new notification |
| 459 | reactor_notified_ = false; |
| 460 | ACE_Guard<ACE_Reverse_Lock<ACE_Thread_Mutex> > rev_guard(rev_lock); |
| 461 | for (Queue::const_iterator pos = cq.begin(), limit = cq.end(); pos != limit; ++pos) { |
| 462 | (*pos)->execute(reactor_wrapper_); |
| 463 | } |
| 464 | } |
| 465 | |
| 466 | processing_ = false; |
| 467 | if (!reactor_notified_) { |
| 468 | condition_.notify_all(); |
| 469 | } |
| 470 | } |
| 471 | |
| 472 | size_t ReactorTask::command_queue_size() const |
| 473 | { |