From 1841682c08badba338f94dcab02ee1a719f06c57 Mon Sep 17 00:00:00 2001 From: Ilya Date: Mon, 31 Jul 2017 23:50:44 +0400 Subject: [PATCH] Clean up '#if CORE' in Utilities.cs (#4425) --- .../engine/interpreter/Utilities.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/System.Management.Automation/engine/interpreter/Utilities.cs b/src/System.Management.Automation/engine/interpreter/Utilities.cs index 8894821d2..7cf048364 100644 --- a/src/System.Management.Automation/engine/interpreter/Utilities.cs +++ b/src/System.Management.Automation/engine/interpreter/Utilities.cs @@ -837,9 +837,8 @@ namespace System.Management.Automation.Interpreter private StorageInfo CreateStorageInfo() { // we do our own locking, tell hosts this is a bad time to interrupt us. -#if !SILVERLIGHT && !CORECLR Thread.BeginCriticalRegion(); -#endif + StorageInfo[] curStorage = s_updating; try { @@ -886,9 +885,8 @@ namespace System.Management.Automation.Interpreter // let others access the storage again Interlocked.Exchange(ref _stores, curStorage); } -#if !SILVERLIGHT && !CORECLR + Thread.EndCriticalRegion(); -#endif } }