Godot Version
4.3
Question
Hello all.
Maybe this is a newbie questions, so please be patient
I am starting a thread with
var exp : Thread
exp = Thread.new()
exp.start(exp_fun)
The thread routine looks as follows:
func exp_fun():
while true:
await get_tree().create_timer(0.5).timeout
print("exp_fun active")
So, effectively i output some “active” message to see if the thread is running.
Problem is: calling
exp.wait_to_finish()
does not work. The thread is still running on forever. I still see the “active” messages running.
What am i doing wrong? I try to solve this problems for hours now, and all documentations say that this should work.
Many thanks for your answers