Skip to content
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

model.base: fix ConstrainedList.clear() atomicity #153

Conversation

jkhsjdhjs
Copy link
Contributor

The default inherited clear() implementation repeatedly deletes the last item of the list until the list is empty. If the last item can be deleted successfully, but an item in front of it that will be deleted later cannot, this makes clear() non-atomic.

Thus, the clear() method is now overriden in an atomic way. Furthermore, the ConstrainedList atomicity test is fixed to correctly test for this as well.

The default inherited `clear()` implementation repeatedly deletes the
last item of the list until the list is empty. If the last item can be
deleted successfully, but an item in front of it that will be deleted
later cannot, this makes `clear()` non-atomic.

Thus, the `clear()` method is now overriden in an atomic way.
Furthermore, the ConstrainedList atomicity test is fixed to correctly
test for this as well.
Copy link
Contributor

@zrgt zrgt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@s-heppner
Copy link
Contributor

Alright, I'll rebase this one.

@s-heppner s-heppner merged commit 886313e into eclipse-basyx:improve/V30 Nov 13, 2023
6 checks passed
@s-heppner s-heppner deleted the fix/constrained_list_clear_atomicity branch November 13, 2023 13:01
@s-heppner s-heppner added the v3.0 label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants