Push Waiting to the Background

Most programs connect to the external world through files, sockets, or standard terminal streams. We call all of these input/output or I/O. Modern processors can perform billions of instructions per second, but most I/O is comparatively slow. Many programs spend substantial amounts of time waiting to read data from files, receive responses from external servers, or find out what the user wants to do.

We need to do this waiting efficiently so that our programs can continue working on other things. While we’re waiting we can either perform other processing or wait for multiple things in parallel. For example, your web browser is a program that spends time waiting for external web servers to return content, while ...

Get Clojure Applied now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.