Reputation: 3364
libevent
provides programmers the ability to write asynchronous programs due to the event notifications and callback function supports. I don't know if the linux kernel provides such system calls to notify user space applications when a particular event occurs. When people use non-blocking operations, they have to poll all the file descriptors to check whether some of them are ready. However, I think libevent maybe utilize some other advanced means to fulfill this task, e.g. with some unbeknown system calls.
So, 1) how does libevent check the status of different events? By polling or other mechanism? 2) Does libevent forks subprocesses of threads when it runs?
Upvotes: 0
Views: 528
Reputation: 201447
The libevent home page reads (in part),
Currently, libevent supports /dev/poll, kqueue(2), event ports, POSIX select(2), Windows select(), poll(2), and epoll(4).
For modern Linux the answer is thus epoll
.
Upvotes: 0