MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / shutdown

Method shutdown

app/src/Sessions/Player.cpp:111–129  ·  view source on GitHub ↗

* @brief Closes the active database, cancels pending loads, joins the worker thread. */

Source from the content-addressed store, hash-verified

109 * @brief Closes the active database, cancels pending loads, joins the worker thread.
110 */
111void Sessions::Player::shutdown()
112{
113 closeFile();
114
115 if (!m_workerThread)
116 return;
117
118 if (m_worker)
119 m_worker->requestCancel();
120
121 m_workerThread->quit();
122 m_workerThread->wait(5000);
123
124 delete m_worker;
125 m_worker = nullptr;
126
127 delete m_workerThread;
128 m_workerThread = nullptr;
129}
130
131//--------------------------------------------------------------------------------------------------
132// Playback status queries

Callers 2

onQuitMethod · 0.45
mainFunction · 0.45

Calls 2

waitMethod · 0.80
requestCancelMethod · 0.45

Tested by

no test coverage detected