Add a shutdown option to main loop
A shutdown option allows another thread to shut the server
down. Typically this is only done at the end of a testcase
that runs the server in one thread, and then executes tests
from another.
Change-Id: I7658bba79285d7c3e41b578c3510faa3363c5e01
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/readd.cpp b/readd.cpp
index 1ac5ddc..0c611b6 100644
--- a/readd.cpp
+++ b/readd.cpp
@@ -41,7 +41,10 @@
// Finished getting options out, so cleanup the parser.
options.reset();
- return serverMain(path.c_str());
+ MainLoop loop(path);
+ loop.run();
+
+ return 0;
}
// vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4