Chapter 13. Going Parallel
Imagine that you have written a program that controls some physical process, like rapidly blinking an LED at a fixed frequency. You want to control the parameters of this process through a web service interface, perhaps to adjust the blinking period. This simple scenario raises a far-reaching question. Consider our previous server examples that repeatedly wait for new incoming HTTP requests. Whenever a request arrives, the server wakes up, does something, sends back a response, and then waits again. While it waits, the server blocks all other activity until the next request comes in, which may easily take hours. This means that even if you wrote some code to blink the LED, it’s not going to blink if the server is sitting ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access