Skip to content

Commit 7595b4c

Browse files
CopilotSENya1990
andauthored
Fix nested Task<Task> in BackgroundTagging by adding .Unwrap()
Agent-Logs-Url: https://github.com/Acumatica/Acuminator/sessions/31d400d5-0821-4c79-a697-0d548535a212 Co-authored-by: SENya1990 <7687400+SENya1990@users.noreply.github.com>
1 parent 1bfd667 commit 7595b4c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Acuminator/Acuminator.Vsix/Coloriser/AsyncTagging/BackgroundTagging.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public static BackgroundTagging StartBackgroundTagging(PXRoslynColorizerTagger t
4747
backgroundTagging.TaggingTask = taggingTask.ContinueWith(task => AfterTaggingActionAsync(task, tagger, backgroundTagging.CancellationToken), //continuation should be on the UI thread
4848
backgroundTagging.CancellationToken,
4949
TaskContinuationOptions.NotOnCanceled,
50-
_vsTaskScheduler);
50+
_vsTaskScheduler)
51+
.Unwrap(); // AfterTaggingActionAsync returns Task, so ContinueWith produces Task<Task>. Unwrap() flattens it into a single Task that reflects the full after-tagging workflow.
5152
return backgroundTagging;
5253
}
5354

0 commit comments

Comments
 (0)