axl_bool valvula_io_waiting_use ( ValvulaCtx ctx,
ValvulaIoWaitingType  type 

poll(2) system call implementation.

linux epoll(2) system call implementation. Allows to configure the default io waiting mechanism to be used by the library.

To get current mechanism selected you must use valvula_io_waiting_get_current. During the compilation process, valvula selects the default mechanism, choosing the best available.

This function is designed to support changing the I/O API at runtime so, you can call to this function during normal valvula operations.

Here is an example of code on how to change the default mechanism to use system call poll(2):

1 // check the mechanism is available
2 if (valvula_io_waiting_is_available (VALVULA_IO_WAIT_POLL)) {
3  // configure the mechanism
4  valvula_io_waiting_use (ctx, VALVULA_IO_WAIT_POLL);
5 }
ctxThe context where the operation will be performed.
typeThe I/O waiting mechanism to be used by the library (especially at the valvula reader module).
axl_true if the mechanism was activated, otherwise axl_false is returned.

References valvula_io_waiting_is_available().