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

Throttle device/client disposals #1564

Closed
2 tasks
atifaziz opened this issue Feb 28, 2022 · 0 comments · Fixed by #1566
Closed
2 tasks

Throttle device/client disposals #1564

atifaziz opened this issue Feb 28, 2022 · 0 comments · Fixed by #1566
Labels
story User Story

Comments

@atifaziz
Copy link
Collaborator

Description

Currently, Parallel.ForEachAsync is used to dispose devices & clients, but Parallel.ForEachAsync is better-suited for CPU-bound operations. An alternative (and potentially general) implementation would simply throttle IAsyncDisposable.DisposeAsync calls, most of which could complete on a single logical thread for very quick disposals (completing synchronously).

Acceptance criteria

  • Parallel.ForEachAsync is no longer used
  • Unit tests are added for an alternative
@atifaziz atifaziz added this to In progress in 🏃 Current Sprint Feb 28, 2022
@atifaziz atifaziz linked a pull request Feb 28, 2022 that will close this issue
🏃 Current Sprint automation moved this from In progress to Done Feb 28, 2022
@p-schuler p-schuler added the story User Story label Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
story User Story
Projects
Development

Successfully merging a pull request may close this issue.

2 participants