MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / handleShutdown

Function handleShutdown

apps/osvr_calibrate.cpp:59–68  ·  view source on GitHub ↗

@brief Shutdown handler function - forcing the server pointer to be global.

Source from the content-addressed store, hash-verified

57
58/// @brief Shutdown handler function - forcing the server pointer to be global.
59void handleShutdown() {
60 osvr::server::ServerPtr server(g_server.lock());
61 if (server) {
62 cout << "Received shutdown signal..." << endl;
63 server->signalStop();
64 } else {
65 cout << "Received shutdown signal but server already stopped..."
66 << endl;
67 }
68}
69
70void waitForEnter() { std::cin.ignore(); }
71

Callers

nothing calls this directly

Calls 2

lockMethod · 0.80
signalStopMethod · 0.45

Tested by

no test coverage detected