mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
proper termination
This commit is contained in:
parent
81a7253e0f
commit
11402708da
2 changed files with 4 additions and 2 deletions
5
Queue.h
5
Queue.h
|
@ -134,13 +134,14 @@ namespace util
|
|||
}
|
||||
if (m_OnEmpty != nullptr)
|
||||
m_OnEmpty ();
|
||||
Queue<Msg>::Wait ();
|
||||
if (m_IsRunning)
|
||||
Queue<Msg>::Wait ();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
bool m_IsRunning;
|
||||
volatile bool m_IsRunning;
|
||||
std::thread m_Thread;
|
||||
OnEmpty m_OnEmpty;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue