From 672ad9493a484a606df2f546caf98a7a7355fe31 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 8 Mar 2012 14:22:25 +0100 Subject: Clarifying comment added --- binaryurp/source/bridge.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'binaryurp/source/bridge.cxx') diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx index fec485d7a33f..7718c53a8266 100644 --- a/binaryurp/source/bridge.cxx +++ b/binaryurp/source/bridge.cxx @@ -242,6 +242,12 @@ void Bridge::start() { writer_->launch(); reader_.set(new Reader(this)); reader_->launch(); + // it is important to call reader_->launch() last here; both + // Writer::execute and Reader::execute can call Bridge::terminate, but + // Writer::execute is initially blocked in unblocked_.wait() until + // Reader::execute has called bridge_->sendRequestChangeRequest(), so + // effectively only reader_->launch() can lead to an early call to + // Bridge::terminate } void Bridge::terminate() { -- cgit