Skip to content
Snippets Groups Projects
Commit 43bd768e authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

don't catch the exception thrown when we cannot obtain the testable mode lock,...

don't catch the exception thrown when we cannot obtain the testable mode lock, this is no longer necessary as all threads will obtain the lock at the beginning
parent c49fbd38
No related branches found
No related tags found
No related merge requests found
......@@ -836,12 +836,7 @@ TransferElement::ID Application::readAny(std::list<std::reference_wrapper<Transf
return mtca4u::TransferElement::readAny(elementsToRead);
}
else {
try {
testableModeUnlock("readAny");
}
catch(std::system_error &e) { // ignore operation not permitted errors, since they happen the first time (lock not yet owned)
if(e.code() != std::errc::operation_not_permitted) throw;
}
testableModeUnlock("readAny");
auto ret = mtca4u::TransferElement::readAny(elementsToRead);
assert(testableModeTestLock()); // lock is acquired inside readAny(), since TestDecoratorTransferFuture::wait() is called there.
return ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment