Godot documentation gives an example class "resourcequeue.gd" in chapter "Background loading".
There is a function "waitforresources":
func _wait_for_resource(res, path):
OS.delay_usec(16000) # wait 1 frame
if queue.size() == 0 || queue != res:
that should wait until the resource is loaded by a separate thread "thread_process".
The code does not work because
will throw an error because VS does not exist. Also an OS.flush does not exist.
When removing this line from code the system crashes, probably a deadlock, because this function will loop forever.
Has anybody had success with this example or does anybody know what "VS.flush()" means ?