summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/AggregateOutput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/sys/AggregateOutput.cpp')
-rw-r--r--cpp/src/qpid/sys/AggregateOutput.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/AggregateOutput.cpp b/cpp/src/qpid/sys/AggregateOutput.cpp
index 4f0a4fa5af..fc95f46fb9 100644
--- a/cpp/src/qpid/sys/AggregateOutput.cpp
+++ b/cpp/src/qpid/sys/AggregateOutput.cpp
@@ -34,6 +34,7 @@ void AggregateOutput::activateOutput() { control.activateOutput(); }
void AggregateOutput::giveReadCredit(int32_t credit) { control.giveReadCredit(credit); }
+namespace {
// Clear the busy flag and notify waiting threads in destructor.
struct ScopedBusy {
bool& flag;
@@ -41,7 +42,8 @@ struct ScopedBusy {
ScopedBusy(bool& f, Monitor& m) : flag(f), monitor(m) { f = true; }
~ScopedBusy() { flag = false; monitor.notifyAll(); }
};
-
+}
+
bool AggregateOutput::doOutput() {
Mutex::ScopedLock l(lock);
ScopedBusy sb(busy, lock);