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

Remove DispatchGroup and replace with condvar #2687

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

Lukasa
Copy link
Contributor

@Lukasa Lukasa commented Mar 20, 2024

Motivation:

DispatchGroup can cause thread performance checker warnings in places we don't want them. We can avoid those warnings in some cases by using a condition variable instead.

Modifications:

  • Replaced a use of DispatchGroup with a condition variable in NIOThreadPool setup.
  • Removed an unnecessary DispatchGroup in the shutdown code

Result:

Fewer thread performance checker warnings.
Resolves #2686

Motivation:

DispatchGroup can cause thread performance checker warnings in
places we don't want them. We can avoid those warnings in some
cases by using a condition variable instead.

Modifications:

- Replaced a use of DispatchGroup with a condition variable
    in NIOThreadPool setup.
- Removed an unnecessary DispatchGroup in the shutdown code

Result:

Fewer thread performance checker warnings.
@Lukasa Lukasa added the patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1) label Mar 20, 2024
Copy link
Contributor

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

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

nice!

@glbrntt glbrntt merged commit f8c5e02 into apple:main Mar 20, 2024
9 checks passed
@Lukasa Lukasa deleted the cb-dispatchgroup-again branch March 20, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1)
Projects
None yet
2 participants