From 518cdf2fbd17ce009258637b3b0afac80deada5c Mon Sep 17 00:00:00 2001 From: Marcus Cuda Date: Sat, 19 Feb 2011 21:48:37 +0800 Subject: [PATCH] fixed silverlight compile bug from last commit --- src/Numerics/Threading/CommonParallel.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Numerics/Threading/CommonParallel.cs b/src/Numerics/Threading/CommonParallel.cs index bd5d4773..a84b9c43 100644 --- a/src/Numerics/Threading/CommonParallel.cs +++ b/src/Numerics/Threading/CommonParallel.cs @@ -332,12 +332,16 @@ namespace MathNet.Numerics.Threading public static void Invoke(params Action[] actions) { var maxThreads = Control.DisableParallelization ? 1 : Control.NumberOfParallelWorkerThreads; +#if SILVERLIGHT + Parallel.Invoke(actions); +#else Parallel.Invoke( new ParallelOptions { MaxDegreeOfParallelism = maxThreads }, actions); +#endif } ///