bool SessionInitializer::tearDownSD(qi::SessionPtr session) { if (session->close().wait(1000) != qi::FutureState_FinishedWithValue) return false; return true; }
bool SessionInitializer::tearDownNightmare(qi::SessionPtr session) { if (_trafficGenerator) _trafficGenerator->stopTraffic(); delete _populationGenerator; delete _trafficGenerator; if (session->close().wait(1000) != qi::FutureState_FinishedWithValue) return false; return true; }
static void session_close(qi::SessionPtr s, qi::Atomic<int>* counter) { s->close(); ++(*counter); }