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