Another small tweak to fix Thread behavioral difference (#22943)
authorStephen Toub <stoub@microsoft.com>
Fri, 1 Mar 2019 09:35:45 +0000 (04:35 -0500)
committerGitHub <noreply@github.com>
Fri, 1 Mar 2019 09:35:45 +0000 (04:35 -0500)
To match existing behavior: https://github.com/dotnet/corefx/blob/5dc8132370532804a5381b90e2ce87d6c52b61f6/src/Common/src/CoreLib/System/Threading/Thread.Unix.cs#L13

src/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs

index feedb50..46ca988 100644 (file)
@@ -408,7 +408,7 @@ namespace System.Threading
 #if FEATURE_COMINTEROP_APARTMENT_SUPPORT
             SetApartmentStateHelper(state, false);
 #else // !FEATURE_COMINTEROP_APARTMENT_SUPPORT
-            false;
+            state == ApartmentState.Unknown;
 #endif // FEATURE_COMINTEROP_APARTMENT_SUPPORT
 
 #if FEATURE_COMINTEROP_APARTMENT_SUPPORT