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

Method start

lib/cpp/test/processor/ServerThread.cpp:34–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32namespace test {
33
34void ServerThread::start() {
35 assert(!running_);
36 running_ = true;
37
38 helper_.reset(new Helper(this));
39
40 // Start the other thread
41 concurrency::ThreadFactory threadFactory;
42 threadFactory.setDetached(false);
43 thread_ = threadFactory.newThread(helper_);
44
45 thread_->start();
46
47 // Wait on the other thread to tell us that it has successfully
48 // bound to the port and started listening (or until an error occurs).
49 concurrency::Synchronized s(serverMonitor_);
50 while (!serving_ && !error_) {
51 serverMonitor_.waitForever();
52 }
53
54 if (error_) {
55 throw transport::TTransportException(transport::TTransportException::NOT_OPEN,
56 "failed to bind on server socket");
57 }
58}
59
60void ServerThread::stop() {
61 if (!running_) {

Callers 15

testSaslOpenMethod · 0.95
testBadPasswordMethod · 0.95
createServerMethod · 0.45
createServerMethod · 0.45
initTestCaseMethod · 0.45
test00Method · 0.45
test01Method · 0.45
test02Method · 0.45
test03Method · 0.45
test04Method · 0.45
loadTestMethod · 0.45
blockTestMethod · 0.45

Calls 5

setDetachedMethod · 0.80
TTransportExceptionClass · 0.50
resetMethod · 0.45
newThreadMethod · 0.45
waitForeverMethod · 0.45

Tested by

no test coverage detected