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:
Chocobo1
2023-08-28 02:08:40 +08:00
committed by GitHub
parent 270c63d64c
commit d8a03cd8d8
4 changed files with 9 additions and 7 deletions

View File

@@ -93,12 +93,12 @@ void TorrentCreator::checkInterruptionRequested() const
void TorrentCreator::requestInterruption()
{
m_interruptionRequested.storeRelaxed(1);
m_interruptionRequested.store(true, std::memory_order_relaxed);
}
bool TorrentCreator::isInterruptionRequested() const
{
return m_interruptionRequested.loadRelaxed() != 0;
return m_interruptionRequested.load(std::memory_order_relaxed);
}
void TorrentCreator::run()