summaryrefslogtreecommitdiffstats
path: root/library/cpp/threading/equeue/equeue.h
diff options
context:
space:
mode:
Diffstat (limited to 'library/cpp/threading/equeue/equeue.h')
-rw-r--r--library/cpp/threading/equeue/equeue.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/cpp/threading/equeue/equeue.h b/library/cpp/threading/equeue/equeue.h
index 4d03ad051db..a76271c27ea 100644
--- a/library/cpp/threading/equeue/equeue.h
+++ b/library/cpp/threading/equeue/equeue.h
@@ -17,13 +17,20 @@ public:
void Stop() noexcept override;
size_t ObjectCount() const;
+
+ void SetCurrentMaxQueueSize(size_t v) {
+ Y_ENSURE(v <= MaxQueueSize_);
+ CurrentMaxQueueSize_ = v;
+ }
private:
class TDecrementingWrapper;
bool TryIncCounter();
private:
THolder<IThreadPool> SlaveQueue_;
+
size_t MaxQueueSize_ = 0;
+ std::atomic<size_t> CurrentMaxQueueSize_ = 0;
std::atomic<size_t> ObjectCount_ = 0;
std::atomic<size_t> GuardCount_ = 0;
};