diff options
author | Rodrigo Kumpera <kumpera@gmail.com> | 2018-03-28 05:50:35 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2018-03-28 10:18:08 +0300 |
commit | 2b3a7ff02e349d36983d9c32c1de2b8f7b6e8da0 (patch) | |
tree | 030ad79c98656ddfb6718c144232b9be61b5b561 | |
parent | 9e38c16f94ff801a9f7c2b678a1db44c9c9caccd (diff) |
[wasm] Ignore TaskCreationOptions.LongRunning under WebAssembly as multiple-threads are not supported.
-rw-r--r-- | src/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs b/src/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs index 7ac733a29..02c6e0ac3 100644 --- a/src/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs +++ b/src/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs @@ -48,7 +48,7 @@ namespace System.Threading.Tasks task.Id, creatingTask == null ? 0 : creatingTask.Id, (int)task.Options); } - +#if !WASM if ((task.Options & TaskCreationOptions.LongRunning) != 0) { // Run LongRunning tasks on their own dedicated thread. @@ -57,6 +57,8 @@ namespace System.Threading.Tasks thread.Start(task); } else +#endif + { // Normal handling for non-LongRunning tasks. bool forceToGlobalQueue = ((task.Options & TaskCreationOptions.PreferFairness) != 0); |