yev_loop_create()
#
yev_loop_create()
initializes a new event loop associated with a given hgobj
instance, allocating resources for event management.
Prototype
int yev_loop_create(
hgobj yuno,
unsigned entries,
int keep_alive,
yev_callback_t callback,
yev_loop_h *yev_loop
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The |
|
|
The maximum number of event entries the loop can handle. |
|
|
Specifies whether the loop should persist after processing events. |
|
|
A callback function invoked for each event; returning |
|
|
Pointer to store the created event loop handle. |
Return Value
Returns 0
on success, or a negative value on failure.
Notes
If callback
is NULL
, a default callback will be used when processing events in yev_loop_run()
.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples