CBL_THREAD_WAIT

Waits for completion of the specified non-detached thread, or returns immediately if the thread has already completed.

Syntax:
call "CBL_THREAD_WAIT" using by value thread-id
                       by reference   thr-return
                       returning      status-code
Parameters:
Using call prototype (see Library Routines - Key) Picture (32-bit systems)
thread-id cblt-pointer usage pointer.
thr-return cblt-pointer usage pointer.
On Entry:

thread-id A pointer to the thread identifier

On Exit:
thr-return The thread's return value.
status-code See RETURN-CODE Values For Thread-control Routines
Comments:

The behavior of this routine is undefined if:

If the routine is successful, the thread's return value is stored in thr-return, the target thread is detached, and the call returns 0.

See Also: