NAME

coreAppWaitOnStop() -- wait for the main dispatch thread to exit.


SYNOPSIS

include "appcore.h"

int coreAppWaitOnStop()

DESCRIPTION

The coreAppWaitOnStop() function waits for the main dispatch thread to exit. appCORE must be in the 'RUN' or 'STOPPING' state for this function to succeed. In a standard appCORE application, this function is called from the main thread and so prevents the main thread, and the process, from exiting.

If configured in the coreAppSPEC_t element, this function will provide a console to the user via stdin and stdout. This feature is normally used during development, debug, and the testing phases of a project.


PARAMETERS

none.

RETURN VALUE

If successful, coreAppWaitOnStop() returns 0. On failure it returns a value of -1.

errno ValueCondition
ECANCELEDCan not be called from the main dispatch thread, or appCORE is not in either the 'RUN' or 'STOPPING' state.

MULTITHREAD SAFETY LEVEL

MT-safe.


SEE ALSO

Functions:
coreAppStart() coreAppStop() coreAppLogZoneInit() coreAppDispatch() coreAppForward()