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

Method preServe

lib/cpp/test/processor/ServerThread.cpp:128–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128void ServerThread::preServe() {
129 // We bound to the port successfully, and are about to start serving requests
130 serverState_->bindSuccessful(port_);
131
132 // Set the real server event handler (replacing ourself)
133 std::shared_ptr<server::TServerEventHandler> serverEventHandler
134 = serverState_->getServerEventHandler();
135 server_->setServerEventHandler(serverEventHandler);
136
137 // Notify the main thread that we have successfully started serving requests
138 concurrency::Synchronized s(serverMonitor_);
139 serving_ = true;
140 serverMonitor_.notify();
141
142 // Invoke preServe() on the real event handler, since we ate
143 // the original preServe() event.
144 if (serverEventHandler) {
145 serverEventHandler->preServe();
146 }
147}
148}
149}
150} // apache::thrift::test

Callers

nothing calls this directly

Calls 5

preServeMethod · 0.65
bindSuccessfulMethod · 0.45
getServerEventHandlerMethod · 0.45
setServerEventHandlerMethod · 0.45
notifyMethod · 0.45

Tested by

no test coverage detected