diff options
Diffstat (limited to 'binaryurp/source/bridge.cxx')
-rw-r--r-- | binaryurp/source/bridge.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
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() { |