mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
refs #476 CThreadedReader::gracefulShutdown using the worker abandon feature, removed m_shutdown.
This commit is contained in:
@@ -26,7 +26,7 @@ namespace BlackCore
|
||||
|
||||
void CDatabaseReader::readInBackgroundThread(CEntityFlags::Entity entities)
|
||||
{
|
||||
if (isFinishedOrShutdown()) { return; }
|
||||
if (isAbandoned()) { return; }
|
||||
this->m_watchdogTimer.stop();
|
||||
bool s = QMetaObject::invokeMethod(this, "ps_read", Q_ARG(BlackMisc::Network::CEntityFlags::Entity, entities));
|
||||
Q_ASSERT_X(s, Q_FUNC_INFO, "Invoke failed");
|
||||
@@ -37,7 +37,7 @@ namespace BlackCore
|
||||
{
|
||||
this->threadAssertCheck();
|
||||
JsonDatastoreResponse datastoreResponse;
|
||||
if (this->isFinishedOrShutdown())
|
||||
if (this->isAbandoned())
|
||||
{
|
||||
CLogMessage(this).info("Terminated data parsing process"); // for users
|
||||
nwReply->abort();
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace BlackCore
|
||||
QString urlString(url.toString());
|
||||
QString replyMessage(nwReply->errorString());
|
||||
|
||||
if (this->isFinishedOrShutdown())
|
||||
if (this->isAbandoned())
|
||||
{
|
||||
CLogMessage(this).info("Terminated loading bootstrap files");
|
||||
nwReply->abort();
|
||||
@@ -232,7 +232,7 @@ namespace BlackCore
|
||||
QString urlString(url.toString());
|
||||
QString replyMessage(nwReply->errorString());
|
||||
|
||||
if (this->isFinishedOrShutdown())
|
||||
if (this->isAbandoned())
|
||||
{
|
||||
CLogMessage(this).info("Terminated loading of update info");
|
||||
nwReply->abort();
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace BlackCore
|
||||
this->threadAssertCheck();
|
||||
|
||||
// Worker thread, make sure to write no members here!
|
||||
if (this->isFinishedOrShutdown())
|
||||
if (this->isAbandoned())
|
||||
{
|
||||
CLogMessage(this).debug() << Q_FUNC_INFO;
|
||||
CLogMessage(this).info("terminated booking parsing process"); // for users
|
||||
@@ -93,7 +93,7 @@ namespace BlackCore
|
||||
CAtcStationList bookedStations;
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
if (this->isFinishedOrShutdown())
|
||||
if (this->isAbandoned())
|
||||
{
|
||||
CLogMessage(this).debug() << Q_FUNC_INFO;
|
||||
CLogMessage(this).info("Terminated booking parsing process"); // for users
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace BlackCore
|
||||
this->threadAssertCheck();
|
||||
|
||||
// Worker thread, make sure to write only synced here!
|
||||
if (this->isFinishedOrShutdown())
|
||||
if (this->isAbandoned())
|
||||
{
|
||||
CLogMessage(this).debug() << Q_FUNC_INFO;
|
||||
CLogMessage(this).info("Terminated VATSIM file parsing process"); // for users
|
||||
@@ -201,7 +201,7 @@ namespace BlackCore
|
||||
Section section = SectionNone;
|
||||
for (const QString &cl : lines)
|
||||
{
|
||||
if (this->isFinishedOrShutdown())
|
||||
if (this->isAbandoned())
|
||||
{
|
||||
CLogMessage(this).debug() << Q_FUNC_INFO;
|
||||
CLogMessage(this).info("Terminated booking parsing process"); // for users
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace BlackCore
|
||||
this->threadAssertCheck();
|
||||
|
||||
// Worker thread, make sure to write thread safe!
|
||||
if (this->isFinishedOrShutdown())
|
||||
if (this->isAbandoned())
|
||||
{
|
||||
CLogMessage(this).debug() << Q_FUNC_INFO;
|
||||
CLogMessage(this).info("terminated METAR decoding process"); // for users
|
||||
@@ -94,7 +94,7 @@ namespace BlackCore
|
||||
QTextStream lineReader(&metarData);
|
||||
while (!lineReader.atEnd())
|
||||
{
|
||||
if (this->isFinishedOrShutdown()) { return; }
|
||||
if (this->isAbandoned()) { return; }
|
||||
QString line = lineReader.readLine();
|
||||
CMetar metar = m_metarDecoder.decode(line);
|
||||
if (metar != CMetar())
|
||||
|
||||
Reference in New Issue
Block a user