diff --git a/include/TestableModeAccessorDecorator.h b/include/TestableModeAccessorDecorator.h index ee06c997b77f6f0bbbd6a6b7aac1af934053d6d2..460c83176604b618f134571e0f01e3f9ba25108b 100644 --- a/include/TestableModeAccessorDecorator.h +++ b/include/TestableModeAccessorDecorator.h @@ -113,14 +113,14 @@ namespace ChimeraTK { if(Application::testableModeTestLock()) Application::testableModeUnlock("doReadTransfer " + this->getName()); } - /** Implement callback called by TransferFuture before it blocks in wait() */ - // TODO Removed in TE spec. Call preRead isntead, see F.4 Still, has to - // handle multiple calls to preRead in readAny() void doPreRead(TransferType type) override { - if(_handleRead) { + _target->preRead(type); + + // Blocking reads have to release the lock so the data transport can happen + if(_handleRead && type == TransferType::read && + TransferElement::_accessModeFlags.has(AccessMode::wait_for_new_data)) { releaseLock(); } - _target->preRead(type); } /** Obtain the testableModeLock if not owned yet, and decrement the counter.