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

Fix missed notification in Mutex example #145

Merged
merged 1 commit into from
Nov 1, 2024
Merged

Conversation

notgull
Copy link
Member

@notgull notgull commented Oct 29, 2024

I forgot to run notify() when I rewrote this example without unsafe
code. It looks like it prevents deadlocks in this mutex implementation.

I believe this fixes #143. @beckend Can you confirm?

@notgull notgull force-pushed the notgull/mutex-example branch from 65204dc to 5623fc8 Compare October 29, 2024 03:42
@notgull notgull requested a review from fogti October 30, 2024 00:53
@beckend
Copy link
Contributor

beckend commented Oct 30, 2024

Looks good!

examples/mutex.rs Outdated Show resolved Hide resolved
I forgot to run notify() when I rewrote this example without unsafe
code. It looks like it prevents deadlocks in this mutex implementation.

I believe this fixes #143.

Signed-off-by: John Nunley <[email protected]>
@notgull notgull force-pushed the notgull/mutex-example branch from 5623fc8 to 4896179 Compare October 31, 2024 01:58
@notgull notgull requested a review from fogti October 31, 2024 02:49
@notgull notgull merged commit 633b2c6 into master Nov 1, 2024
10 checks passed
@notgull notgull deleted the notgull/mutex-example branch November 1, 2024 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

This seems actually not stable(Dead lock)
3 participants