diff options
| author | kulikov <[email protected]> | 2026-03-20 19:39:06 +0300 |
|---|---|---|
| committer | kulikov <[email protected]> | 2026-03-20 20:17:51 +0300 |
| commit | 14bf6e9ab2e2a49e7b066904080cf9e121a348d9 (patch) | |
| tree | 723aeeaacfc85442b14485526ccf342169640cf0 /library/cpp/threading/equeue/equeue.h | |
| parent | 8c1168348ffdcc290ddee600735708101b5f708c (diff) | |
Switch to std atomics
commit_hash:5d980b19ed177f3a4ce03ba7c7d89ab9d711b8e8
Diffstat (limited to 'library/cpp/threading/equeue/equeue.h')
| -rw-r--r-- | library/cpp/threading/equeue/equeue.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/library/cpp/threading/equeue/equeue.h b/library/cpp/threading/equeue/equeue.h index c61b9f7b857..4d03ad051db 100644 --- a/library/cpp/threading/equeue/equeue.h +++ b/library/cpp/threading/equeue/equeue.h @@ -1,9 +1,10 @@ #pragma once #include <util/thread/pool.h> -#include <library/cpp/deprecated/atomic/atomic.h> #include <util/generic/ptr.h> +#include <atomic> + //actual queue limit will be (maxQueueSize - numBusyThreads) or 0 class TElasticQueue: public IThreadPool { public: @@ -23,6 +24,6 @@ private: private: THolder<IThreadPool> SlaveQueue_; size_t MaxQueueSize_ = 0; - TAtomic ObjectCount_ = 0; - TAtomic GuardCount_ = 0; + std::atomic<size_t> ObjectCount_ = 0; + std::atomic<size_t> GuardCount_ = 0; }; |
