|
|
|
@ -67,7 +67,9 @@ namespace MathNet.Numerics.Threading |
|
|
|
|
|
|
|
// fast forward execution in case parallelization is disabled
|
|
|
|
// (cdrnet, 200908): should we fast forward on STA threads as well?
|
|
|
|
if (Control.DisableParallelization || ThreadQueue.ThreadCount <= 1) |
|
|
|
if (Control.DisableParallelization |
|
|
|
|| ThreadQueue.ThreadCount <= 1 |
|
|
|
|| ThreadQueue.IsInWorkerThread) |
|
|
|
{ |
|
|
|
for (int i = fromInclusive; i < toExclusive; i++) |
|
|
|
{ |
|
|
|
@ -136,7 +138,9 @@ namespace MathNet.Numerics.Threading |
|
|
|
|
|
|
|
// fast forward execution in case parallelization is disabled
|
|
|
|
// (cdrnet, 200908): should we fast forward on STA threads as well?
|
|
|
|
if (Control.DisableParallelization || ThreadQueue.ThreadCount <= 1) |
|
|
|
if (Control.DisableParallelization |
|
|
|
|| ThreadQueue.ThreadCount <= 1 |
|
|
|
|| ThreadQueue.IsInWorkerThread) |
|
|
|
{ |
|
|
|
for (int i = 0; i < actions.Length; i++) |
|
|
|
{ |
|
|
|
|