EventLoop Struct

Header: #include <applibs/eventloop.h>

An object that monitors event sources and dispatches their events to handlers.

typedef struct EventLoop EventLoop;

Remarks

An EventLoop object is single-threaded. An application can use one or more EventLoop objects per thread, but each object must only be used in one thread. EventLoop_Stop can be called for an object in another thread; however, the other EventLoop functions must be called from the same thread as the target object in order to prevent undefined behavior.

To dispatch the events that need processing, the application must call EventLoop_Run. The event handlers are called in the same thread where EventLoop_Run is called.