CBL_THREAD_SUSPEND

Syntax:

call "CBL_THREAD_SUSPEND" using by value thread-id

Parameters:

  Using call prototype (see Key) Picture
thread-id cblt-pointer usage pointer.

On Entry:

thread-id A pointer to the thread identifier

On Exit:

return-code A value indicating success or otherwise. See RETURN-CODE Values For Thread-control Routines

Comments:

If thread-id is NULL or is the current thread, this routine suspends the current thread until another thread does a CBL_THREAD_RESUME on it. If successful, RETURN_CODE is set to 0. If one or more CBL_THREAD_RESUME routines have already targeted this thread then RETURN_CODE is set to the negative value of the number of further times CBL_THREAD_SUSPEND will have to be called before the thread is actually suspended.

Otherwise, the call returns a non-zero (positive) error code.

You cannot suspend threads other than the current thread.

Behavior is undefined if thread-id is invalid.