Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhathcock committed Feb 5, 2025
1 parent bad21cb commit 5da6626
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/Speckle.Sdk/Serialisation/V2/PriorityScheduler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,19 @@ protected override void QueueTask(Task task)
public Task WaitForCompletion()
{
_tasks.CompleteAdding();
return Task.Factory.StartNew(async () =>
{
while (_threads != null && _threads.Any(x => x.IsAlive))
{
await Task.Delay(TimeSpan.FromMilliseconds(500)).ConfigureAwait(false);
}
}, CancellationToken.None, TaskCreationOptions.AttachedToParent, TaskScheduler.Default).Unwrap();
return Task
.Factory.StartNew(
async () =>
{
while (_threads != null && _threads.Any(x => x.IsAlive))
{
await Task.Delay(TimeSpan.FromMilliseconds(500)).ConfigureAwait(false);
}
},
CancellationToken.None,
TaskCreationOptions.AttachedToParent,
TaskScheduler.Default
)
.Unwrap();
}
}

0 comments on commit 5da6626

Please sign in to comment.