See if we need to schedule on the primary thread for the transaction or change the thread that is associated with the VC. If we reschedule, the scheduled action is returned. Otherwise, NULL is returned
| 301 | // See if we need to schedule on the primary thread for the transaction or change the thread that is associated with the VC. |
| 302 | // If we reschedule, the scheduled action is returned. Otherwise, NULL is returned |
| 303 | inline Action * |
| 304 | ProxyTransaction::adjust_thread(Continuation *cont, int event, void *data) |
| 305 | { |
| 306 | NetVConnection *vc = this->get_netvc(); |
| 307 | EThread *this_thread = this_ethread(); |
| 308 | if (vc && vc->thread != this_thread) { |
| 309 | if (vc->thread->is_event_type(ET_NET)) { |
| 310 | return vc->thread->schedule_imm(cont, event, data); |
| 311 | } else { // Not a net thread, take over this thread |
| 312 | vc->thread = this_thread; |
| 313 | } |
| 314 | } |
| 315 | return nullptr; |
| 316 | } |
| 317 | |
| 318 | inline IOBufferReader * |
| 319 | ProxyTransaction::get_remote_reader() |
no test coverage detected