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

Fixed race condition when cancelling acquire() in Lock or Semaphore #388

Merged
merged 4 commits into from
Nov 16, 2021

Conversation

agronholm
Copy link
Owner

Fixes #387.

@@ -82,7 +82,6 @@ async def run_async_cm(self) -> Optional[bool]:
value = await self._async_cm.__aenter__()
except BaseException as exc:
self._enter_future.set_exception(exc)
raise
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this related?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Whoa, how did that get into the PR...must've been an artifact of my work on that other PR. Good job noticing this!

@agronholm agronholm merged commit 326901c into master Nov 16, 2021
@agronholm agronholm deleted the fix-387 branch November 16, 2021 08:40
@agronholm
Copy link
Owner Author

Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential race condition in Lock
2 participants