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 ValueCondition
EINVALThe thread handle is invalid.
ECANCELEDThis function is not allowed to stop the main dispatch thread. Use coreAppStop() instead.
EIDRMThe thread handle is stale.

MULTI-THREAD SAFETY LEVEL

MT-safe.


SEE ALSO

Functions:
coreThreadStart() coreThreadStop() coreThreadAttach() coreThreadDettach() coreThreadSocketAdd() coreThreadSocketRemove() corehThread()