Add dedicated wasm implementation for Parallel.Invoke and Parallel.For (#57283)
authorKatelyn Gadd <kg@luminance.org>
Tue, 17 Aug 2021 16:40:02 +0000 (09:40 -0700)
committerGitHub <noreply@github.com>
Tue, 17 Aug 2021 16:40:02 +0000 (09:40 -0700)
commitaddbbcb411bda2a9744e893d492b6b87b8d933fa
treef71e3809daad8fe19e31e12702ca9acc3c0a4a94
parent09c2902b002462420b3bde625c75498567eafab1
Add dedicated wasm implementation for Parallel.Invoke and Parallel.For (#57283)

Introduces a simple single-threaded implementation for Parallel.Invoke, .For, and .ForEach that bypasses Task and wait primitives so that in browser environments parallel loop operations complete synchronously on the current thread
src/libraries/System.Private.Runtime.InteropServices.JavaScript/tests/System.Private.Runtime.InteropServices.JavaScript.Tests.csproj
src/libraries/System.Private.Runtime.InteropServices.JavaScript/tests/System/Runtime/InteropServices/JavaScript/ParallelTests.cs [new file with mode: 0644]
src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/Parallel.cs
src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/TaskReplicator.cs
src/libraries/System.Threading.Tasks.Parallel/tests/BreakTests.cs
src/libraries/System.Threading.Tasks.Parallel/tests/ParallelFor.cs