Function ThreadWait() Foundation
Waits for the termination of one thread
ThreadWait( <aThreads> , ; [<nTimeOut>], ) --> oThread | NIL
If one thread terminates within the time limit defined with <nTimeOut>, the function returns the corresponding Thread object. Otherwise, the return value is NIL.
The function ThreadWait() causes the current thread to wait until one thread from a number of threads has terminated. Compared to the :synchronize() method of the Thread class, the function has the advantage that the current thread does not need to wait for a particular thread, but rather can wait for any thread from a number of threads. Note that the number of threads the current thread can wait for is limited to the constant THREAD_WAIT_MAX by the operating system.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.