a0JoinSlave()

Waits a slave thread to end.


Syntax

a0tError a0JoinSlave(
a0tThread *thread,
void **result );

Arguments

Namerd/wrDescription
thread write Address of the slave thread desciptor.
result read Pointer to the result pointer of the tread.

Description

This function waits a slave thread thread to end and store its result pointer in the address pointed by result. If no result is expected, a NULL pointer may be used. This function blocks the calling thread until the specified slave thread ends.

On return of this function, the variable pointed by result contains the pointer passed by the exiting thread, with the a0ExitThread() function.


Return Values

If an error condition occurs, it returns the error code, otherwise it returns A0ErrOk. Possible values are as follows:
Error CodeDescription
A0ErrInvThread The thread descriptor is invalid.
A0ErrOkSuccessful completion.

See Also

a0NewSlave() a0DetachSlave() a0ExitThread()