| 158 | } |
| 159 | |
| 160 | void EventLoop::queueInLoop(Functor cb) |
| 161 | { |
| 162 | { |
| 163 | MutexLockGuard lock(mutex_); |
| 164 | pendingFunctors_.push_back(std::move(cb)); |
| 165 | } |
| 166 | |
| 167 | if (!isInLoopThread() || callingPendingFunctors_) |
| 168 | { |
| 169 | wakeup(); |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | size_t EventLoop::queueSize() const |
| 174 | { |
no outgoing calls