dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.36k stars 4.75k forks source link

[mono] Implement pinvoke-detach-1.cs tests on Windows #43093

Open lambdageek opened 4 years ago

lambdageek commented 4 years ago

Follow-up task for https://github.com/mono/mono/pull/20435 - the PR introduces a new set of embedding API tests that create foreign threads (threads started by native code, not by the runtime) and calling various Mono APIs in order to execute some managed code, followed by detaching from the runtime and leaving the threads running but not interacting with Mono anymore.

These tests (which on non-Windows use posix threads, mutexes and condition variables) need to be ported to Windows using the Windows APIs instead.

lambdageek commented 4 years ago

One slight complication at the moment is that the work should be done over at https://github.com/mono/mono, as the mono runtime embedding tests aren't wired up to run in dotnet/runtime yet. There are instructions for building Mono on Windows