From 854100c07597e3f221377136e10c6fd2c4510f3c Mon Sep 17 00:00:00 2001 From: neuecc Date: Mon, 9 Nov 2020 14:20:03 +0900 Subject: [PATCH] fix invalid usage of SpinLock, #195 --- .../Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs | 2 +- .../Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs index 01a3056..f65ae59 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs @@ -12,7 +12,7 @@ namespace Cysharp.Threading.Tasks.Internal readonly PlayerLoopTiming timing; - SpinLock gate = new SpinLock(); + SpinLock gate = new SpinLock(false); bool dequing = false; int actionListCount = 0; diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs index ed58701..450e019 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs @@ -9,7 +9,7 @@ namespace Cysharp.Threading.Tasks const int MaxArrayLength = 0X7FEFFFFF; const int InitialSize = 16; - static SpinLock gate = new SpinLock(); + static SpinLock gate = new SpinLock(false); static bool dequing = false; static int actionListCount = 0;