Merge branch 'main' into dim/fixes

This commit is contained in:
Dimitrie Stefanescu
2021-04-03 18:07:21 +01:00
committed by GitHub
4 changed files with 32 additions and 7 deletions
@@ -52,7 +52,7 @@ namespace GrasshopperAsyncComponentDemo.SampleImplementations
public override void DoWork(Action<string, double> ReportProgress, Action Done)
{
// Checking for cancellation
if (CancellationToken.IsCancellationRequested) return;
if (CancellationToken.IsCancellationRequested) { Done(); return; }
for (int i = 0; i <= MaxIterations; i++)
{
@@ -63,7 +63,7 @@ namespace GrasshopperAsyncComponentDemo.SampleImplementations
ReportProgress(Id, ((double)(i + 1) / (double)MaxIterations));
// Checking for cancellation
if (CancellationToken.IsCancellationRequested) return;
if (CancellationToken.IsCancellationRequested) { Done(); return; }
}
Done();