| Index: src/IceThreading.h
|
| diff --git a/src/IceThreading.h b/src/IceThreading.h
|
| index 40ada47c1622d4780cfe7fd3b5b5f83301795910..1cdca8e764a9d1a6536f99e4955ac40b826a96c1 100644
|
| --- a/src/IceThreading.h
|
| +++ b/src/IceThreading.h
|
| @@ -67,7 +67,7 @@ public:
|
| }
|
| GrewOrEnded.notify_one();
|
| }
|
| - std::unique_ptr<T> blockingPop() {
|
| + std::unique_ptr<T> blockingPop(size_t NotifyWhenDownToSize = MaxStaticSize) {
|
| std::unique_ptr<T> Item;
|
| bool ShouldNotifyProducer = false;
|
| {
|
| @@ -75,7 +75,7 @@ public:
|
| GrewOrEnded.wait(L, [this] { return IsEnded || !empty() || Sequential; });
|
| if (!empty()) {
|
| Item = pop();
|
| - ShouldNotifyProducer = !IsEnded;
|
| + ShouldNotifyProducer = (size() < NotifyWhenDownToSize) && !IsEnded;
|
| }
|
| }
|
| if (ShouldNotifyProducer)
|
|
|