mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 13:48:05 -06: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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user