event_base_config_flag

A flag passed to event_config_set_flag().

These flags change the behavior of an allocated event_base.

@see event_config_set_flag(), event_base_new_with_config(), event_method_feature

Values

ValueMeaning
EVENT_BASE_FLAG_NOLOCK0x01

Do not allocate a lock for the event base, even if we have locking set up.

EVENT_BASE_FLAG_IGNORE_ENV0x02

Do not check the EVENT_* environment variables when configuring an event_base

EVENT_BASE_FLAG_STARTUP_IOCP0x04

Windows only: enable the IOCP dispatcher at startup

If this flag is set then bufferevent_socket_new() and evconn_listener_new() will use IOCP-backed implementations instead of the usual select-based one on Windows.

EVENT_BASE_FLAG_NO_CACHE_TIME0x08

Instead of checking the current time every time the event loop is ready to run timeout callbacks, check after each timeout callback.

EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST0x10

If we are using the epoll backend, this flag says that it is safe to use Libevent's internal change-list code to batch up adds and deletes in order to try to do as few syscalls as possible. Setting this flag can make your code run faster, but it may trigger a Linux bug: it is not safe to use this flag if you have any fds cloned by dup() or its variants. Doing so will produce strange and hard-to-diagnose bugs.

This flag can also be activated by settnig the EVENT_EPOLL_USE_CHANGELIST environment variable.

This flag has no effect if you wind up using a backend other than epoll.

Meta