Skip to content

Conversation

@amrfarid140
Copy link
Contributor

Closes #657

Description

The change ensures that the store lock is always released from withThreadSafety regardless of the execution result of threadSafety.block().

This helps in avoiding the lock being in a locked state when a cancellation exception is propagated from downstream.

The test mentioned in the issue and added here now passes 100% of the time. Of course happy to delete it (or move it somewhere else) before merging.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Test Plan

See unit test

Checklist:

Before submitting your PR, please review and check all of the following:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my change is effective
  • New and existing unit tests pass locally with my changes

Additional Notes:

Add any other information about the PR here.

amrfarid140 and others added 3 commits October 1, 2024 17:47
Signed-off-by: Amr Yousef <amr.farid140@gmail.com>
Signed-off-by: Amr Yousef <amr.farid140@gmail.com>
Fixes MobileNativeFoundation#653 and MobileNativeFoundation#654

Signed-off-by: Scott Olcott <scottolcott@gmail.com>
Signed-off-by: Amr Yousef <amr.farid140@gmail.com>
This reverts commit 76f34d4.

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>
@matt-ramotar matt-ramotar merged commit 067bd41 into MobileNativeFoundation:main Oct 4, 2024
matt-ramotar pushed a commit that referenced this pull request Feb 19, 2025
* Add test case

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

* Always Release storeLock

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

* Update kermit to 2.0.4 (#655)

Fixes #653 and #654

Signed-off-by: Scott Olcott <scottolcott@gmail.com>
Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

* Revert "Update kermit to 2.0.4 (#655)"

This reverts commit 76f34d4.

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

---------

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>
Signed-off-by: Scott Olcott <scottolcott@gmail.com>
Co-authored-by: Scott Olcott <scottolcott@gmail.com>
itsandreramon pushed a commit to itsandreramon/Store that referenced this pull request Feb 26, 2025
* Add test case

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

* Always Release storeLock

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

* Update kermit to 2.0.4 (MobileNativeFoundation#655)

Fixes MobileNativeFoundation#653 and MobileNativeFoundation#654

Signed-off-by: Scott Olcott <scottolcott@gmail.com>
Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

* Revert "Update kermit to 2.0.4 (MobileNativeFoundation#655)"

This reverts commit 76f34d4.

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

---------

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>
Signed-off-by: Scott Olcott <scottolcott@gmail.com>
Co-authored-by: Scott Olcott <scottolcott@gmail.com>
matt-ramotar pushed a commit that referenced this pull request Sep 18, 2025
* Add test case

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

* Always Release storeLock

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

* Update kermit to 2.0.4 (#655)

Fixes #653 and #654

Signed-off-by: Scott Olcott <scottolcott@gmail.com>
Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

* Revert "Update kermit to 2.0.4 (#655)"

This reverts commit 76f34d4.

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

---------

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>
Signed-off-by: Scott Olcott <scottolcott@gmail.com>
Co-authored-by: Scott Olcott <scottolcott@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[BUG] MutableStore occasionally hangs when cancelling streams

3 participants