mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 08:16:16 -07:00
Use atomic primitives from standard library
QAtomicInteger underlying is using std::atomic structures, so using std::atomic directly should not be a problem for us. PR #19507.
This commit is contained in:
parent
270c63d64c
commit
d8a03cd8d8
4 changed files with 9 additions and 7 deletions
|
@ -1274,7 +1274,7 @@ void Application::adjustThreadPriority() const
|
|||
void Application::cleanup()
|
||||
{
|
||||
// cleanup() can be called multiple times during shutdown. We only need it once.
|
||||
if (!m_isCleanupRun.testAndSetAcquire(0, 1))
|
||||
if (m_isCleanupRun.exchange(true, std::memory_order_acquire))
|
||||
return;
|
||||
|
||||
LogMsg(tr("qBittorrent termination initiated"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue