Parcourir la source

Workaround stealing failure by disabling it in 32bits

Jérémie Laval il y a 15 ans
Parent
commit
f831cfdf27
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      mcs/class/corlib/System.Threading.Tasks/Parallel.cs

+ 4 - 0
mcs/class/corlib/System.Threading.Tasks/Parallel.cs

@@ -184,6 +184,10 @@ namespace System.Threading.Tasks
 							break;
 					}
 
+					// FIXME: the following code is failing at the moment on 32bits, disable it for now
+					if (!Environment.Is64BitProcess)
+						return;
+
 					// Try toExclusive steal fromInclusive our right neighbor (cyclic)
 					int len = num + localWorker;
 					for (int sIndex = localWorker + 1; sIndex < len; ++sIndex) {