5 #ifndef EVENT_THREADPOOL_H_ 6 #define EVENT_THREADPOOL_H_ EventTPoolManager event_tpool_manager_new(int thread_num, int is_threadsafe, const char *plugin_path)
new EventTPoolManager
void event_tpool_manager_free(EventTPoolManager this)
destructor of EventTPoolManager
size_t event_tpool_manager_get_threadnum(EventTPoolManager this)
get size of thread
event_tpool_add_result_t event_tpool_add(EventTPoolManager this, EventSubscriber subscriber, void *arg)
add EventSubscriber to threadpool
EventTPoolManager class instance definition.
This is API as ThreadPool data definition for ThreadPooldesign petten by using libevent.
event_tpool_add_result_t event_tpool_add_thread(EventTPoolManager this, int threadid, EventSubscriber subscriber, void *arg)
add EventSubscriber to threadpool, if you want to choose thead, please use it.
void event_tpool_set_stack_size(size_t stack_size)
Set thread stack size.
EventSubscriber class instance definition, this is storaged in any threads.
void event_tpool_del(EventTPoolManager this, int fd)
delete EventSubscriber to threadapool.
event_tpool_add_result_t event_tpool_update(EventTPoolManager this, EventTPoolThreadInfo event_handle, EventSubscriber subscriber, void *arg)
update EventSubscriber to threadpool.
void event_tpool_atfork_child(EventTPoolManager this)
Update member at fork, please call this API on child process if you use fork.