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

Optimise waitgroup #17

Merged
merged 1 commit into from
Apr 15, 2024
Merged

Optimise waitgroup #17

merged 1 commit into from
Apr 15, 2024

Conversation

JothamWong
Copy link
Member

To avoid doing wasteful computation, I introduce a yieldThreadState and a blockThreadState. Both of this achieve the same thing except that yieldThread times out the thread while blockThread blocks the thread. This signals two different things to the deadlock detector to avoid false positives.
This also speeds up the standard library implementation of the WaitGroup since we no longer pointlessly iterate until the TimeQuanta for the thread reaches 0.

@JothamWong JothamWong merged commit f0f5e69 into main Apr 15, 2024
1 check passed
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.

1 participant