Thread.join
void * join()Waits until thread finishes, i.e. the function func, as given to [glib.thread.Thread.new_], returns or [glib.thread.Thread.exit] is called. If thread has already terminated, then [glib.thread.Thread.join] returns immediately.
Any thread can wait for any other thread by calling [glib.thread.Thread.join], not just its 'creator'. Calling [glib.thread.Thread.join] from multiple threads for the same thread leads to undefined behaviour.
The value returned by func or given to [glib.thread.Thread.exit] is returned by this function.
[glib.thread.Thread.join] consumes the reference to the passed-in thread. This will usually cause the #GThread struct and associated resources to be freed. Use [glib.thread.Thread.ref_] to obtain an extra reference if you want to keep the GThread alive beyond the [glib.thread.Thread.join] call.