From b3c6a753879abcf5753973dc1409381a4c4bf765 Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Tue, 14 Jan 2025 08:44:10 +0000 Subject: [PATCH] add a task.yield for a cached model to let progress happen (#204) --- src/Speckle.Sdk/Serialisation/V2/Receive/ObjectLoader.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Speckle.Sdk/Serialisation/V2/Receive/ObjectLoader.cs b/src/Speckle.Sdk/Serialisation/V2/Receive/ObjectLoader.cs index b80a5b01..837ba759 100644 --- a/src/Speckle.Sdk/Serialisation/V2/Receive/ObjectLoader.cs +++ b/src/Speckle.Sdk/Serialisation/V2/Receive/ObjectLoader.cs @@ -43,6 +43,9 @@ public sealed class ObjectLoader( { //assume everything exists as the root is there. var allChildren = ClosureParser.GetChildrenIds(rootJson).ToList(); + //this probably yields away from the Main thread to let host apps update progress + //in any case, this fixes a Revit only issue for this situation + await Task.Yield(); return (rootJson, allChildren); } }