mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
refs #476, improvements on gracefulShutdown
* gracefulShutdown in metar reader and other readers * made m_shutdown thread safe * Demoted log level for reader * helper function finished or shutdown
This commit is contained in:
committed by
Mathew Sutcliffe
parent
54448fd2b2
commit
4d3d9fa6be
@@ -173,7 +173,7 @@ namespace BlackCore
|
||||
this->threadAssertCheck();
|
||||
|
||||
// Worker thread, make sure to write only synced here!
|
||||
if (this->isFinished())
|
||||
if (this->isFinishedOrShutdown())
|
||||
{
|
||||
CLogMessage(this).debug() << Q_FUNC_INFO;
|
||||
CLogMessage(this).info("Terminated VATSIM file parsing process"); // for users
|
||||
@@ -200,9 +200,9 @@ namespace BlackCore
|
||||
|
||||
QStringList clientSectionAttributes;
|
||||
Section section = SectionNone;
|
||||
foreach(QString currentLine, lines)
|
||||
for (const QString &cl : lines)
|
||||
{
|
||||
if (this->isFinished())
|
||||
if (this->isFinishedOrShutdown())
|
||||
{
|
||||
CLogMessage(this).debug() << Q_FUNC_INFO;
|
||||
CLogMessage(this).info("Terminated booking parsing process"); // for users
|
||||
@@ -210,7 +210,7 @@ namespace BlackCore
|
||||
}
|
||||
|
||||
// parse lines
|
||||
currentLine = currentLine.trimmed();
|
||||
QString currentLine(cl.trimmed());
|
||||
if (currentLine.isEmpty()) continue;
|
||||
if (currentLine.startsWith(";"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user