[netcore] Managed ThreadPool implementation (mono/mono#17387)
authorFilip Navara <navara@emclient.com>
Thu, 24 Oct 2019 08:56:25 +0000 (10:56 +0200)
committerZoltan Varga <vargaz@gmail.com>
Thu, 24 Oct 2019 08:56:25 +0000 (04:56 -0400)
commitb6aa9e1125248a4c7cc4d7ffe3cbab101c37e9be
treea07a5d1e9c7529a88c03647327b4e21e35d8f9ce
parentace84342024f4729b33a8c2517b75b3fd83d1048
[netcore] Managed ThreadPool implementation (mono/mono#17387)

* Wire up the managed side of the portable thread pool

* Remove old native thread pool code

* Fix non-netcore build

* Fix Thread.IsThreadPoolThread

* Fix MSVC builds

* Code style fix

* Make the locking primitives uninterruptible

* Revert icall changes for non-netcore

* Implement Thread.ResetThreadPoolThread

* Compile out more thread pool code for netcore

* Remove ThreadPoolBoundHandle, it is shared now

* Address PR feedback on code style

Commit migrated from https://github.com/mono/mono/commit/7a15b718735eccfac6ecd7467a09279d2f23e16e
24 files changed:
src/mono/mono/metadata/Makefile.am
src/mono/mono/metadata/class-internals.h
src/mono/mono/metadata/domain.c
src/mono/mono/metadata/icall-def-netcore.h
src/mono/mono/metadata/marshal.c
src/mono/mono/metadata/monitor.c
src/mono/mono/metadata/threadpool-io.c
src/mono/mono/metadata/threadpool-netcore.c [deleted file]
src/mono/mono/metadata/threadpool.c
src/mono/mono/metadata/threads.c
src/mono/mono/mini/debugger-agent.c
src/mono/mono/mini/mini-exceptions.c
src/mono/msvc/libmonoruntime-common.targets
src/mono/msvc/libmonoruntime-common.targets.filters
src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj
src/mono/netcore/System.Private.CoreLib/src/LinkerDescriptor/System.Private.CoreLib.xml
src/mono/netcore/System.Private.CoreLib/src/System.Threading/LowLevelLifoSemaphore.Unix.cs [new file with mode: 0644]
src/mono/netcore/System.Private.CoreLib/src/System.Threading/LowLevelLock.cs [new file with mode: 0644]
src/mono/netcore/System.Private.CoreLib/src/System.Threading/LowLevelSpinWaiter.cs [new file with mode: 0644]
src/mono/netcore/System.Private.CoreLib/src/System.Threading/Monitor.cs
src/mono/netcore/System.Private.CoreLib/src/System.Threading/Thread.cs
src/mono/netcore/System.Private.CoreLib/src/System.Threading/ThreadPool.cs
src/mono/netcore/System.Private.CoreLib/src/System.Threading/ThreadPoolBoundHandle.cs [deleted file]
src/mono/netcore/System.Private.CoreLib/src/System.Threading/WaitHandle.cs