When a worker thread starts a timer, such as adding file descriptor or timer to an ePump thread, the ePump thread needs to be awakened from suspension. The wakeup operation is implemented by epwakeup facility. The current version fixed and improved wakeup mechanism.
Respectively compatible with Windows IOCP, Linux EventFD and other ePump wakeup mechanism;
Simplified the procedure of associating wakeup-fd with iodev_t and adding it to monitoring queue of ePump thread.
Compiled and tested the source in FreeBSD, solved the incompatibility of system call;
Added kqueue event notification mechanism in FreeBSD;
Tuned the wakeup facility from kevent blocking in FreeBSD;
本版本更新的内容如下:
在FreeBSD下完成了编译和调试,解决了系统不兼容问题;
在FreeBSD系统下,增加了kqueue事件通知机制;
解决了FreeBSD下,epump线程阻塞在kevent时的唤醒机制;
v2.1.8
2 years ago
The ePump threads need to be waken up instantly when a new device fd or a timer instance is initialized during suspending by select;
UDP socket pair of client and server replaced eventfd as wakeup facility. Fixed the bug that udp socket not initialized during startup;
For select model, the device fd should be removed from monitoring queue when new event is generated, and re-appended when callback of event completed. Fixed the bug not following the rule;
Added functions of set/clear fd monitoring queue, such as iodev_set_poll, iodev_clear_poll;
Replaced 'struct sockaddr' with ep_sockaddr_t in the case of accept, recvfrom, getpeername, getsockname. Solved the problem failing to get correct result of these call in Windows;
ePump is a full-nonblocking framework, even in DNS name resolving process. Added the DNS name server to epump core object from local host configuration.