Admin Production rocket
Current Publication

CBL_THREAD_WAIT

Enterprise Developer for Eclipse (including UNIX Components) V7.0
Rocket® Enterprise Developer (formerly a product of Micro Focus or formerly a product of Open Text) documentation, created before Rocket Software acquired certain products from OpenText, may include outdated references to "Micro Focus" or "OpenText", both of which are trademarks of OpenText or its affiliates. Rocket Software is not affiliated with Micro Focus or OpenText and has since rebranded these products as Rocket® products. You may also encounter outdated links in this documentation. If you do, please contact Rocket Support (support@rocketsoftware.com) for assistance.

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 Key) Picture
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.
Note: For 64-bit Windows applications, this value is limited to 32-bit values, and so cannot be used to return memory addresses.
status-code See RETURN-CODE Values For Thread-control Routines

Comments:

The behavior of this routine is undefined if:

  • thread-id is invalid.
  • thread-id specifies a previously detached thread.
  • Two threads attempt to use CBL_THREAD_WAIT and/or CBL_THREAD_DETACH on the same thread at the same time.
  • While in a CBL_THREAD_WAIT, the target thread is killed by CBL_THREAD_KILL.

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.