MCPcopy Create free account
hub / github.com/apache/thrift / drainPendingTask

Method drainPendingTask

lib/cpp/src/thrift/server/TNonblockingServer.cpp:1064–1075  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1062}
1063
1064bool TNonblockingServer::drainPendingTask() {
1065 if (threadManager_) {
1066 std::shared_ptr<Runnable> task = threadManager_->removeNextPending();
1067 if (task) {
1068 TConnection* connection = static_cast<TConnection::Task*>(task.get())->getTConnection();
1069 assert(connection && connection->getServer() && connection->getState() == APP_WAIT_TASK);
1070 connection->forceClose();
1071 return true;
1072 }
1073 }
1074 return false;
1075}
1076
1077void TNonblockingServer::expireClose(std::shared_ptr<Runnable> task) {
1078 TConnection* connection = static_cast<TConnection::Task*>(task.get())->getTConnection();

Callers

nothing calls this directly

Calls 6

removeNextPendingMethod · 0.80
getTConnectionMethod · 0.80
forceCloseMethod · 0.80
getMethod · 0.45
getServerMethod · 0.45
getStateMethod · 0.45

Tested by

no test coverage detected