int event_base_get_num_events(struct event_base *, unsigned int) Functionality:获取标志中指定的事件的数量 Parameters:传入event_base结构 EVENT_BASE_COUNT_ACTIVE:返回活动的事件数量 EVENT_BASE_COUNT_VIRTUAL:返回内部的虚拟事件数量 EVENT_BASE_COUNT_ADDED:返回使用event_add()添加的事件数量 Returned Value...
EV_ET的位域 event_callback_fn cb,// 事件发生时调用的回调函数 void * arg // 传递给回调函数的参数 ) // 源码 struct event * event_new(struct event_base *base, evutil_socket_t fd, short events, void (*cb)(evutil_socket_t, short, void *), void *arg) { struct event *ev; ev =...
EVENT_BASE_FLAG_IGNORE_ENV标志首次出现在 Libevent 2.0.2-alpha 中。 EVENT_BASE_FLAG_PRECISE_TIMER标志首次出现在 Libevent 中 2.1.2-阿尔法。event_config_set_num_cpus_hint() 函数是 Libevent 中的新函数 2.0.7-rc 和 event_config_set_max_dispatch_interval() 是 2.1.1-alpha 中的新功能。 本节...
3.7 event_config_set_num_cpus_hint函数 04. 检查*event_base*的后端 4.1 event_get_supported_methods函数 4.2 event_base_get_method函数 4.3 event_base_get_features函数 05. 释放event_base 06. 设置*event_base*的优先级 07. fork之后重新初始化base 08. 参考 01. 简介 使用libevent函数之前需要分配一...
that keeps the loop from exiting.EVENT_BASE_COUNT_ADDED : count the number of events which have been added to event base, including internal events.@param event_base@param 事件类型@return base中相应事件类型的个数*/intevent_base_get_num_events(structevent_base*,unsignedint);/**根据传入的标志...
intevent_config_set_num_cpus_hint(structevent_config*cfg,intcpus) 这个函数当前仅在Windows上使用IOCP时有用,虽然将来可能在其他平台上有用。这个函数告诉event_config在生成多线程event_base的时候,应该试图使用给定数目的CPU。注意这仅仅是一个提示:event_base使用的CPU可能比你选择的要少。
eventBase.loop(); ASSERT_EQ(callback.getLoopInvocations(),7); ASSERT_EQ(callback.getEventInvocations(),7); close(pipeFds[0]); } 开发者ID:NextGenIntelligence,项目名称:folly,代码行数:36,代码来源:EventBaseTest.cpp 示例2: serverThread
This class contains a number of constants that correspond to the value of eventType of EventGridEvents and type of CloudEvents, when the event originated from an Azure service. This list should be updated with all the service event strings. It also contains a mapping from each service event ...
Trigger events are pre-defined events and raised by the system when it performs database table operations. When a record is deleted, inserted, modified, or renamed, a trigger is raised.The trigger events are closely associated with the following table triggers:...
!strcmp(event_base_get_method(base),"kqueue")) supports_et =1;elsesupports_et =0; TT_BLATHER(("Checking for edge-triggered events with %s, which should %s""support edge-triggering", event_base_get_method(base), supports_et?"":"not "));/* Initalize one event */ev = event_new(ba...