Why do we need blocking and non blocking functions?

The issue is the mismatch of CPU speed ( think blindingly fast) and typical I/O (input/output) operation which are by comparison very slow. Examples of I/O are:

  • Reading/Writing files to disk

  • Waiting for network operations to complete etc.

Â