449 {
450 ParallelLoopResult result = default(ParallelLoopResult);
452 {
453 result._completed = true;
454 return result;
455 }
460 OperationCanceledException
oce =
null;
462 {
465 }, (object?)null));
467 if (ParallelEtwProvider.Log.IsEnabled())
468 {
471 }
472 try
473 {
474 try
475 {
477 {
479 {
481 }
484 {
485 return;
486 }
487 if (ParallelEtwProvider.Log.IsEnabled())
488 {
489 ParallelEtwProvider.Log.ParallelFork(TaskScheduler.Current.Id,
Task.CurrentId.GetValueOrDefault(),
forkJoinContextID);
490 }
492 bool flag = false;
493 try
494 {
497 {
499 }
501 {
504 {
506 flag = true;
507 }
508 }
510 do
511 {
512 if (body != null)
513 {
515 {
517 {
518 break;
519 }
520 body(i);
521 }
522 }
524 {
526 {
527 parallelLoopState.CurrentIteration =
j;
529 }
530 }
531 else
532 {
534 {
535 parallelLoopState.CurrentIteration =
k;
537 }
538 }
540 {
542 break;
543 }
544 }
546 }
548 {
551 }
552 finally
553 {
555 {
557 }
558 if (ParallelEtwProvider.Log.IsEnabled())
559 {
560 ParallelEtwProvider.Log.ParallelJoin(TaskScheduler.Current.Id,
Task.CurrentId.GetValueOrDefault(),
forkJoinContextID);
561 }
562 }
564 }
565 finally
566 {
568 {
570 }
571 }
573 {
575 }
576 }
577 catch (AggregateException
ex)
578 {
580 }
581 finally
582 {
586 {
588 }
589 if (ParallelEtwProvider.Log.IsEnabled())
590 {
591 int num = 0;
593 ParallelEtwProvider.Log.ParallelLoopEnd(TaskScheduler.Current.Id,
Task.CurrentId.GetValueOrDefault(),
forkJoinContextID, num);
594 }
595 }
596 return result;
597 }
static int ComputeTimeoutPoint(int timeoutLength)
static int s_forkJoinContextID
static void ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException)
static bool CheckTimeoutReached(int timeoutOccursAt)