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

keys_handler: Use scopes to drop mutexes before await #422

Merged
merged 3 commits into from
Jul 8, 2022

Conversation

ansasaki
Copy link
Contributor

The MutexGuard is not async aware, meaning the mutexes should be
unlocked before any await call. This change uses scopes to drop the
locked mutexes before calling await.

Signed-off-by: Anderson Toshiyuki Sasaki [email protected]

The MutexGuard is not async aware, meaning the mutexes should be
unlocked before any await call.  This change uses scopes to drop the
locked mutexes before calling await.

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
@lkatalin
Copy link
Contributor

lkatalin commented Jul 1, 2022

Interesting - how was this working before, without the scopes? Was it just keeping the mutex locked indefinitely?

@ansasaki
Copy link
Contributor Author

ansasaki commented Jul 4, 2022

/packit retest-failed

@ansasaki
Copy link
Contributor Author

ansasaki commented Jul 4, 2022

Interesting - how was this working before, without the scopes? Was it just keeping the mutex locked indefinitely?

Probably we were lucky and nobody tried to get the mutex while we were awaiting (meaning only one request were being handled at once)

@lkatalin lkatalin merged commit 5b9072a into keylime:master Jul 8, 2022
@ansasaki ansasaki deleted the unlock_before_await branch September 27, 2023 08:33
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.

4 participants