3 ms·
That is event-driven code. A typical accept_connection only returns after receiving a connection event. The I/O code in handle_connection blocks until the eve
by nitrogen 15y ago
That is event-driven code. A typical accept_connection only returns after receiving a connection event. The I/O code in handle_connection blocks until the event that data can be read/written. The event handling just happens in the OS instead of in userspace with poll/select/etc.
- FooBarWidget 15y agoEh? If you reason that way then all I/O code is evented and that makes the discussion meaningless. Event-styled code doesn't have anything that blocks except the event loop I/O multiplexer and everything returns to the event loop ASAP.