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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.