-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readNonBlocking() and readLatest() don't always call postRead() #116
Comments
will fix ApplicationCore ExceptionHandling Spec 11.23 |
The "hasNewData" flag is the return value of "readTransferNonBlocking" or "readTransferLatest". For readTransfer use true. For symmetry reasons the return value of write shall be added as postWrite(bool dataLost). |
Do before of after #119. It introduces an interface change at the same place. |
This statement is contradicting with the second task in the opening comment. After |
- These functions receive bool hasNewData as second argument - In readNonBlocking and readLatest, postRead is now called unconditionally
These functions now receive the bool dataLost flag
, |
Child of ChimeraTK/ApplicationCore#123
readNonBlocking() and readLatest() only call postRead if there was new data. This is wrong. preRead() and postRead() must always be called in pairs, for instance if the user buffer needs to be restored.
In addidion, this will prevent proper exception propagation with the new exception handling scheme.
Solution in order not to perform unnecessary calculations:
change postRead() and doPostRead() to postRead(bool hasNewData) and doPostRead(bool hasNewData), and let the implementations decide what to do in case of no data.
Introduce the API change to postRead() and doPostRead() in all places
In read() and TransferFuture::wait() and transferGroup::read(), call postRead(true) after a successful read transfer, and postRead(false) if there was an exception
In readLatest() and readNonBlocking() call it with the return value of the corresponding doReadXxx if there was no exception, and false if there was an exception
Change postWrite to receive a data lost flag (see comment below)
Do not change any implementations yet.
All tests should still pass. If not, note in this ticket which tests are failing.
If there are failing test check if they belong to the follow-up ticket backends must not assign a fresh version number if there was no new data #122. Note in that ticket which corresponding tests are failing.
Fix all remaining tests (or the implementations such that the tests pass, depending on which of the two does not correspond to the new spec).
Merge into the master
The text was updated successfully, but these errors were encountered: