-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Enable option to use the Windows ThreadPool #85373
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
Merged
eduardo-vp
merged 172 commits into
dotnet:main
from
eduardo-vp:feature/enable-windows-threadpool
Jun 15, 2023
Merged
Changes from 164 commits
Commits
Show all changes
172 commits
Select commit
Hold shift + click to select a range
2d5b4c6
Split RegisteredWaitHandle.Portable.cs
eduardo-vp 5860353
Split ThreadPoolBoundHandle.cs
eduardo-vp c0283b6
Create WindowsThreadPool.cs and update ThreadPool files
eduardo-vp 33083ee
Move Win32ThreadPoolBoundHandle.cs implementation to ThreadPoolBoundH…
eduardo-vp c7925c9
Move Win32ThreadPoolNativeOverlapped.cs implementation to ThreadPoolN…
eduardo-vp 0d188a1
Move Win32ThreadPoolPreAllocatedOverlapped.cs implementation to Threa…
eduardo-vp 2007a13
Fix some dependencies
eduardo-vp a3d1aea
Fix some dependencies
eduardo-vp 50d8155
Fix some build errors
eduardo-vp 911f415
Split Thread.NativeAot.cs and create Thread.CoreCLR.Windows.cs
eduardo-vp e0fb07c
More errors fixed
eduardo-vp b5f2859
Fix next set of errors
eduardo-vp c6a9d1c
Fix more build errors
eduardo-vp b7ddda0
Restore Thread files
eduardo-vp 13894d0
Adding some comments
eduardo-vp 7367244
Restore WaitHandle
eduardo-vp aa0c74e
Fix dependencies
eduardo-vp af6cfd6
Add some pragmas
eduardo-vp d2de264
Before adding SafeThreadPoolIOHandle
eduardo-vp 9da7ec3
Add SafeThreadPoolIOHandle and Interop.ThreadPoolIO.cs
eduardo-vp 6c420fa
Most errors fixed
eduardo-vp 157508d
Fix CoreCLR errors
eduardo-vp 1f54bd2
Fix some NativeAOT errors
eduardo-vp 6a972ed
Fix building errors
eduardo-vp 4727ea3
Fix RegisteredWaitHandle
eduardo-vp cb38e38
Remove AotCommonPath + Sort Aot dependencies
eduardo-vp 25319b4
OnFinalRelease only if WindowsThreadPool is enabled
eduardo-vp cf84c03
Moving RegisteredWaitCallback to a single place
eduardo-vp bbf441b
Move RestartWait to a single place
eduardo-vp 54ae7e6
Nit in ThreadPoolBoundHandle
eduardo-vp 83e1554
Add PerformCallback to RegisteredWaitHandle.Portable.cs
eduardo-vp 9db8828
Merge with main
eduardo-vp 7fc89a6
Move switch files to libraries and rename them
eduardo-vp 5e4e6cd
Move nativeaot files under libraries
eduardo-vp 4cc04db
NativeAotSourcesRoot
eduardo-vp 1d654d6
Move Portable ThreadPool implementation to ThreadPool.CoreCLR.Core.cs…
eduardo-vp 5c8d29c
Allow Mono to switch between portable and windows thread pool
eduardo-vp e4612e5
Delete UnmanagedThreadPoolWorkItem + place calls to PortableThreadPoo…
eduardo-vp 64b279b
Move imports of Interop.ThreadPool.cs and Interop.ThreadPoolIO.cs to …
eduardo-vp 4a97daf
Make *Core methods private
eduardo-vp 272455c
Restore compability supressions
eduardo-vp a8278b5
Remove ThreadPool.CoreCLR.cs
eduardo-vp 03dfd3e
Remove PreAllocatedOverlapped.Portable.cs
eduardo-vp 26bd6ac
Move CompleteWaitThreadPoolWorkItem to libraries
eduardo-vp 42f3317
Move most of ThreadPool.CoreCLR.Core to libraries
eduardo-vp 3645b3a
Use code in libraries instead of Win32ThreadPoolBoundHandle
eduardo-vp adcc33b
ThreadPool.CoreCLR.Core.cs -> ThreadPool.CoreCLR.cs | Trimming missin…
eduardo-vp 0db9013
Add switch to ILLink.Substitutions.Shared.xml
eduardo-vp 0cb6edd
Camel case used in overlapped files
eduardo-vp 4296e0a
Revert changes in RuntimeEventSource
eduardo-vp 89f10b5
Fix NativeAOT build
eduardo-vp 3c5d3f6
Move Win32ThreadPoolPreAllocatedOverlapped.cs and Win32ThreadPoolRegi…
eduardo-vp a6f967b
Revert changes in Thread.cs and ThreadPool.Portable.Unix.cs. Rename t…
eduardo-vp a76d74c
Allow NativeAOT to switch between windows and portable threadpoopl
eduardo-vp e98773a
Remote ThreadPool.Windows.cs
eduardo-vp edc7a2f
Fix clr on unix
eduardo-vp 4672af9
Fix clr on windows
eduardo-vp 90edcbe
RegisteredWaitHandle properties using corresponding fields
eduardo-vp 328786b
Nit in RegisteredWaitHandle.cs
eduardo-vp 17538af
Make UseWindowsThreadPool a property
eduardo-vp a893396
Add partial modifiers
eduardo-vp cf13b13
Update UseWindowsThreadPool property + Trimming tests template
eduardo-vp f0c0f8d
Nit in System.Runtime.TrimmingTests.proj
eduardo-vp 0814be8
Fix ReportThreadStatus not found on wasm
eduardo-vp a7e6528
Update src/libraries/System.Private.CoreLib/src/System/Threading/Comp…
eduardo-vp 2a93ef4
Fix browser/mono/wasm
eduardo-vp 2502f20
Temporarily removing changes in ILLink.Substitutions.Shared.xml
eduardo-vp 4673d2b
Safe check in BindHandle
eduardo-vp 0c86ba4
Update ILLink.Substitutions.Shared.xml
eduardo-vp c2c0174
Set Trimming for Windows only
eduardo-vp f8539d3
Remove switch from ILLink.Substitutions.Shared.xml
eduardo-vp a1b785e
Add Trimming tests
eduardo-vp f1808b7
Update System.Runtime.TrimmingTests.proj - run tests on Windows only
eduardo-vp fba93f3
Setting default value of UseWindowsThreadPool to true. Just for testing
eduardo-vp 352cb73
Enable ThreadPoolCallbackWrapper in NativeAOT
eduardo-vp 64b9961
Restore ManagedThreadId.cs
eduardo-vp 3ea8ef1
Update src/libraries/System.Private.CoreLib/src/System/Threading/Thre…
eduardo-vp c182642
Update src/libraries/System.Private.CoreLib/src/System/Threading/Wind…
eduardo-vp e29c0d0
Update src/libraries/System.Private.CoreLib/src/System/Threading/Thre…
eduardo-vp 4fb0a4a
Update src/libraries/System.Private.CoreLib/src/System/Threading/Port…
eduardo-vp 65428f2
Rename ThreadPool.cs to ThreadPool.Windows.cs
eduardo-vp f4ee52f
Update src/libraries/System.Private.CoreLib/src/System/Threading/Thre…
eduardo-vp 569798b
Restore condition for PortableThreadPool
eduardo-vp b0e7172
Make Handle property in RegisteredWaitHandle non-nullable. Set Featur…
eduardo-vp 76e0bcb
Rename PreAllocatedOverlapped.cs to PreAllocatedOverlapped.Windows.cs
eduardo-vp 9a33eeb
Adding xml to PreAllocatedOverlapped::UnsafeCreate
eduardo-vp bb8c78d
Remove xml from PreAllocatedOverlapped::UnsafeCreatePortableCore
eduardo-vp e074410
Sort usings
eduardo-vp 4d1c2dd
Update src/libraries/System.Private.CoreLib/src/System/Threading/Thre…
eduardo-vp 86087bc
Renaming: *Core to *WindowsThreadPool
eduardo-vp cea582b
Merging ThreadPoolBoundHandle.cs and ThreadPoolBoundHandle.Windows.cs
eduardo-vp b97d175
Renaming: RegisteredWaitHandle.cs to RegisteredWaitHandle.Windows.cs
eduardo-vp eb2c9fd
Make threadLocalCompletionCountObject in ThreadPoolWorkQueue.cs nullable
eduardo-vp fbc8a6e
Merge branch 'main' into feature/enable-windows-threadpool
eduardo-vp a40bb4e
Testing: disable trimming + enable windows threadpool by default
eduardo-vp 988d53f
Add wrapper to WindowsThreadPool::DispatchCallback
eduardo-vp fcb97c6
Add xml to ThreadPoolBoundHandle::BindHandle
eduardo-vp b9c462f
Merging ThreadPoolBoundHandle.Portable.cs with ThreadPoolBoundHandle.…
eduardo-vp f66a503
Renaming: ThreadPoolBoundHandle.Portable.Core.cs to ThreadPoolBoundHa…
eduardo-vp a769503
Removing IsWorkerTrackingEnabledInConfig from WindowsThreadPool class
eduardo-vp 16cdae4
Refactor IsWorkerTrackingEnabledInConfig
eduardo-vp 09b3f2e
Refactor YieldFromDispatchLoop
eduardo-vp 45787e4
Fix ThreadPool.Unix.cs
eduardo-vp 6d85f82
Update System.Private.CoreLib.Shared.projitems
eduardo-vp 5288082
Renaming RegisteredWaitHandle files
eduardo-vp db02dac
Fix System.Private.CoreLib.Shared.projitems
eduardo-vp 78a9764
Renaming: PreAllocatedOverlapped.Portable.Core.cs to PreAllocatedOver…
eduardo-vp 8e1fee3
Moving BindHandlePortableCore to ThreadPoolBoundHandle.Portable
eduardo-vp b80a136
Update src/libraries/System.Private.CoreLib/src/System/Threading/Thre…
eduardo-vp bf6e471
Assertion in ThreadPoolBoundHandle finalizer
eduardo-vp e673550
Delete some comments
eduardo-vp 028005f
Add some comments
eduardo-vp e68c5b9
Fix BindHandlePortableCore
eduardo-vp 288c04d
Unnecesarry checks in ThreadPoolBoundHandle.Unix.cs removed
eduardo-vp 2b4fdf5
Partial modified removed in ThreadPoolBoundHandle.Browser.Mono.cs
eduardo-vp c87c53b
Remove ReportThreadStatusCore
eduardo-vp cfb7b8b
Remove ThreadPool.Mono.cs
eduardo-vp 0c722a6
Partial modified in ThreadPool.Browser.Mono.cs removed
eduardo-vp 3b73bf2
Partial modifier in PreAllocatedOverlapped.Browser.Mono.cs removed
eduardo-vp 711546d
ThreadPoolPreAllocatedOverlapped.WindowsThreadPool.cs renamed to PreA…
eduardo-vp d393fd5
Place fields and properties from RegisteredWaitHandle.Windows.cs to t…
eduardo-vp dd02c79
Fix RegisteredWaitHandle on Unix
eduardo-vp afd1057
Renamed ThreadPool.Portable.cs to ThreadPool.NonCoreCLR.cs
eduardo-vp 24bb2df
Add ReportThreadStatus to ThreadPool.Browser.Mono.cs
eduardo-vp 3e51deb
Place XML on public methods
eduardo-vp 7673336
Fix ThreadPoolCallbackWrapper
eduardo-vp e6bbd3b
Cache Thread.CurrentThread
eduardo-vp 8ea3735
Set WorkerTracking to false when Windows thread pool is enabled
eduardo-vp 0c58c8b
Update comment on RegisteredWaitHandle::PerformCallbackWindowsThreadPool
eduardo-vp b38ff77
Remove assertions in ThreadPoolBoundHandle::BindHandle
eduardo-vp 71ea96f
Enable Windows thread pool timer
eduardo-vp cbdbe58
Add Timer.WindowsThreadPool.cs only on Windows
eduardo-vp ec6eebc
Fix TimerQueue.Browser.Mono.cs
eduardo-vp d9d5802
Fix browser buid
eduardo-vp b519b17
Enable FeaturePortableTimer on NativeAot
eduardo-vp 6da6201
Supress Finalizer on RegisteredWaitHandle
eduardo-vp 2acc143
Throw argument exception in ThreadPoolBoundHandle.Unix.cs
eduardo-vp 7a5e7b7
Set UseWindowsThreadPool=true for testing
eduardo-vp f8bf852
Revert "Set UseWindowsThreadPool=true for testing"
eduardo-vp 53521b8
Enable trimming
eduardo-vp 00fe833
Remove redundant assertions
eduardo-vp de39881
Fix IsWorkerTrackingEnabledInConfig in ThreadPool.Windows.cs
eduardo-vp 883d966
Update src/libraries/System.Private.CoreLib/src/System/Threading/Thre…
eduardo-vp d70d86e
Renamed BindHandleCore to BindHandlePortableCore
eduardo-vp 09e932e
Fix Timer* files
eduardo-vp 4e56e7b
Move constructor to TimerQueue.Windows.cs
eduardo-vp b59b980
Removed GetEnableWorkerTracking()
eduardo-vp 71c83d0
Added TickCount64 to TimerQueue.Browser.Mono.cs
eduardo-vp cfc1fa1
Enable Windows Threadpool tests
eduardo-vp 51df61e
Updated System.Threading.ThreadPool.sln
eduardo-vp 8c93a14
Remove MinimumVisualStudioVersion
eduardo-vp 059f1a1
Set System.Threading.ThreadPool.UseWindowsThreadPool to false in Syst…
eduardo-vp 553f226
Disable tests that call SetMinThreads/SetMaxThreads for WindowsThread…
eduardo-vp 156f7e5
Disabling MetricTest() for Windows Threadpool
eduardo-vp 37c096a
Update src/libraries/System.Private.CoreLib/src/System/Threading/Thre…
eduardo-vp 6064280
Remove ThreadPool.NonCoreCLR.cs
eduardo-vp 14b3ff0
Remove conditions for YieldFromDispatchLoop in ThreadPool.Windows.cs
eduardo-vp 01d7da3
Removed EnsureConfigInitializedCore() in ThreadPool.Unix.cs
eduardo-vp 72c84b3
Fix EnsureConfigInitialized()
eduardo-vp 4471f52
Updated EnsureConfigInitialized() to internal
eduardo-vp e887277
Enabled Windows ThreadPool on Native AOT by default
eduardo-vp 21375a8
Added windows condition to UseWindowsThreadPool in Microsoft.NETCore.…
eduardo-vp fd3e2f9
Fixed bug
eduardo-vp 23ed1f2
Fix bug in Microsoft.NETCore.Native.targets
eduardo-vp 3646176
Fixed bug in Microsoft.NETCore.Native.targets + Enabled MetricsTest f…
eduardo-vp 0651298
Fixed ThreadCount for WindowsThreadPool on Clr+Mono
eduardo-vp 56be9f1
Fixed InitializeForThreadPoolThread
eduardo-vp 659e1c5
Merged with main
eduardo-vp 2d2a640
Fixed review comments
eduardo-vp eb70d53
Removed [UnsupportedOSPlatform(browser)] from RegisteredWaitHandle.Un…
eduardo-vp efa6420
Removed CoreLib's reference in System.Threading.ThreadPool.sln
eduardo-vp 117778c
Merge with main + Fix conflicts
eduardo-vp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 0 additions & 56 deletions
56
src/coreclr/System.Private.CoreLib/src/System/Threading/ThreadPool.CoreCLR.Windows.cs
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/ThreadPool.NativeAot.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.