From 8bb6290c2670609405fd428e346092f4ed654374 Mon Sep 17 00:00:00 2001 From: Roman Gershman Date: Sat, 7 Sep 2024 17:52:10 +0300 Subject: [PATCH] chore: add SimpleChannel::NotifyProducer function --- util/fibers/simple_channel.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util/fibers/simple_channel.h b/util/fibers/simple_channel.h index 7fd9e9fa..51580d20 100644 --- a/util/fibers/simple_channel.h +++ b/util/fibers/simple_channel.h @@ -81,6 +81,10 @@ template > class Si return q_.capacity(); } + // Advanced control - tries to wake up the producer, blocked on a full queue. + void NotifyProducer() { + push_ec_.notify(); + } private: Queue q_; unsigned throttled_pushes_ = 0;