MCPcopy Create free account
hub / github.com/apache/impala / ScheduleReactorTask

Method ScheduleReactorTask

be/src/kudu/rpc/reactor.cc:938–954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

936}
937
938void Reactor::ScheduleReactorTask(ReactorTask* task) {
939 bool was_empty;
940 {
941 std::unique_lock<LockType> l(lock_);
942 if (closing_) {
943 // We guarantee the reactor lock is not taken when calling Abort().
944 l.unlock();
945 task->Abort(ShutdownError(false));
946 return;
947 }
948 was_empty = pending_tasks_.empty();
949 pending_tasks_.push_back(*task);
950 }
951 if (was_empty) {
952 thread_.WakeThread();
953 }
954}
955
956bool Reactor::DrainTaskQueue(boost::intrusive::list<ReactorTask>* tasks) { // NOLINT(*)
957 std::lock_guard<LockType> l(lock_);

Callers 3

QueueResponseForCallMethod · 0.80
CompleteNegotiationMethod · 0.80
ScheduleOnReactorMethod · 0.80

Calls 6

ShutdownErrorFunction · 0.85
push_backMethod · 0.80
WakeThreadMethod · 0.80
unlockMethod · 0.45
AbortMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected