AlgoMaster Logo

Readiness vs Completion, Edge vs Level

Medium Priority11 min readUpdated August 14, 2026

Suppose a server uses edge-triggered epoll. A socket receives 8 KB of data, but the handler reads only 1 KB before returning to epoll_wait().

The remaining 7 KB may never trigger another notification because the socket never became unreadable.

This highlights two important distinctions:

  • Readiness vs. completion: Is the operation ready to be attempted, or has it already finished?
  • Level-triggered vs. edge-triggered: Is the event reported while the condition remains true, or only when the state changes?

With edge-triggered readiness, a handler should usually keep reading until the operation would block again.

These distinctions determine when to perform I/O and when it is safe to wait for another event.

This chapter compares readiness with completion and level-triggered with edge-triggered notification, explaining drain loops, EAGAIN, one-shot events, EOF, errors, and the obligations each model places on handlers.

Premium Content

Subscribe to unlock full access to this content and more premium articles.