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

Stop counting work items from ThreadPoolTypedWorkItemQueue for ThreadPool.CompletedWorkItemCount #106854

Merged

Conversation

eduardo-vp
Copy link
Member

@eduardo-vp eduardo-vp commented Aug 23, 2024

These work items are used to parallelize the actual work items but they don't do any actual work. It's more precise to only count actual work items for ThreadPool.CompletedWorkItemCount.

Fixes #104284

Eduardo Manuel Velarde Polar and others added 2 commits August 23, 2024 15:15
…s.cs

Co-authored-by: Koundinya Veluri <kouvel@users.noreply.github.com>
@eduardo-vp eduardo-vp merged commit 2df9935 into dotnet:main Aug 28, 2024
143 of 147 checks passed
jtschuster pushed a commit to jtschuster/runtime that referenced this pull request Sep 17, 2024
…Pool.CompletedWorkItemCount (dotnet#106854)

* Stop counting work items from ThreadPoolTypedWorkItemQueue as completed work items

* Fix CompletedWorkItemCount

* Update src/libraries/System.Threading.ThreadPool/tests/ThreadPoolTests.cs

Co-authored-by: Koundinya Veluri <kouvel@users.noreply.github.com>

* Run CompletedWorkItemCountTest on Windows only

---------

Co-authored-by: Eduardo Manuel Velarde Polar <evelardepola@microsoft.com>
Co-authored-by: Koundinya Veluri <kouvel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ThreadPool.CompletedWorkItemCount double counting IO completion work items
2 participants