| << Prev | appCORE Programming Guide | Next >> |
NAME
coreThreadStopJoin() -- request the dispatch thread to shutdown and wait for exit.
SYNOPSIS
include "appcore.h" int coreThreadStopJoin( corehTHR_t h, void** s )
DESCRIPTION
The coreThreadStopJoin() function is used to stop a dispatch thread and wait for it to exit. This function sends the thread an exit message and if successful waits for the thread to exit. All messages ahead of the exit message on the thread's input queue are still processed.
Use the function coreThreadStop() to stop a thread and not wait for it to exit.
PARAMETERS
h
Target thread handle.
s
Pointer to exit status.
RETURN VALUE
If successful, coreThreadStopJoin() returns 0. On failure it returns a value of -1 and sets errno to one of the following:
| errno Value | Condition |
| EINVAL | The thread handle is invalid. |
| ECANCELED | This function is not allowed to stop the main dispatch thread. Use coreAppStop() instead. |
| EIDRM | The thread handle is stale. |
MULTI-THREAD SAFETY LEVEL
MT-safe.
SEE ALSO
| << Prev | appCORE Programming Guide | Next >> |