| 111 | } |
| 112 | |
| 113 | int ReactorTask::init_i(ThreadStatusManager* thread_status_manager, |
| 114 | const String& name, |
| 115 | ACE_Reactor* reactor) |
| 116 | { |
| 117 | // If we've already been opened, let's clean up the old stuff |
| 118 | cleanup(); |
| 119 | |
| 120 | // thread status reporting support |
| 121 | thread_status_manager_ = thread_status_manager; |
| 122 | name_ = name; |
| 123 | reactor_ = reactor; |
| 124 | |
| 125 | // Set our reactor and proactor pointers to a new reactor/proactor objects. |
| 126 | #ifdef OPENDDS_REACTOR_TASK_ASYNC |
| 127 | if (use_async_send_ && !reactor_) { |
| 128 | reactor_ = new ACE_Reactor(new ACE_WFMO_Reactor, 1); |
| 129 | |
| 130 | ACE_WIN32_Proactor* proactor_impl = new ACE_WIN32_Proactor(0, 1); |
| 131 | proactor_ = new ACE_Proactor(proactor_impl, 1); |
| 132 | reactor_->register_handler(proactor_impl, proactor_impl->get_handle()); |
| 133 | } else |
| 134 | #endif |
| 135 | if (!reactor_) { |
| 136 | reactor_ = new ACE_Reactor(new ACE_Select_Reactor, true); |
| 137 | proactor_ = 0; |
| 138 | } |
| 139 | |
| 140 | ACE_Event_Handler::reactor(reactor_); |
| 141 | |
| 142 | if (!timer_queue_) { |
| 143 | timer_queue_ = new TimerQueueType(); |
| 144 | reactor_->timer_queue(timer_queue_); |
| 145 | } |
| 146 | |
| 147 | if (!reactor_wrapper_.open(reactor_)) { |
| 148 | if (log_level >= LogLevel::Error) { |
| 149 | ACE_ERROR((LM_ERROR, "(%P|%t) NOTICE: ReactorTask::init_i: could not open ReactorWrapper\n")); |
| 150 | } |
| 151 | return -1; |
| 152 | } |
| 153 | |
| 154 | return 0; |
| 155 | } |
| 156 | |
| 157 | int ReactorTask::open_reactor_task(ThreadStatusManager* thread_status_manager, |
| 158 | const String& name, |
nothing calls this directly
no test coverage detected