How does a non-blocking event loop work?

Twisted has a non-blocking event loop.

I understand what the loop of a blocking event does (like, from the Wikipedia page), but I can’t understand how a non-blocking one does it.

+3
source share
1 answer
while (true)
    wait_for_events
    handle_events

, , (select/poll UNIX, WaitForMultipleEvents Windows, epoll Linux kqueue FreeBSD ..). ( , ..) - . , (, select). , . , - , .

. libevent GUI - GTK + Qt.

+3

Source: https://habr.com/ru/post/1750704/


All Articles