fix(renderer): drain threaded loads on shutdown
This commit is contained in:
@@ -2,6 +2,7 @@ extends SceneTree
|
||||
|
||||
const DEFAULT_MANIFEST_PATH := "res://src/tools/render_baseline_manifest.json"
|
||||
const M2_NATIVE_ANIMATED_BUILDER := preload("res://addons/mpq_extractor/loaders/m2_native_animated_builder.gd")
|
||||
const SHUTDOWN_DRAIN_FRAMES := 2
|
||||
|
||||
|
||||
func _initialize() -> void:
|
||||
@@ -167,6 +168,10 @@ func _capture_async() -> void:
|
||||
print("RENDER_BASELINE report=%s results=%d" % [report_path, captured])
|
||||
|
||||
world.queue_free()
|
||||
# SceneTree deletion is deferred. Allow the world and its queued children
|
||||
# to run their shutdown paths before engine teardown.
|
||||
for unused_frame in SHUTDOWN_DRAIN_FRAMES:
|
||||
await process_frame
|
||||
if captured <= 0:
|
||||
push_error("No checkpoints selected. --only filter was: %s" % only)
|
||||
quit(1)
|
||||
|
||||
Reference in New Issue
Block a user