You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Description
Currently,
Parallel.ForEachAsync
is used to dispose devices & clients, butParallel.ForEachAsync
is better-suited for CPU-bound operations. An alternative (and potentially general) implementation would simply throttleIAsyncDisposable.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 usedThe text was updated successfully, but these errors were encountered: