O'Reilly logo

The Ruby Way: Solutions and Techniques in Ruby Programming, Third Edition by André Arko, Hal Fulton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Threads and Concurrency

He draweth out the thread of his argument finer than the staple of his verbosity.

—William Shakespeare,Love’s Labours Lost, Act V, Sc. 1

One of the wonders of modern computers is that they appear to be able to do more than one thing at a time. Even back in the days of single-core processes, the lone CPU could switch between its various jobs quickly enough that it appeared to be doing many things at once. With the advent of inexpensive computers with multiple CPUs, that illusion has become reality. Thus, we take it for granted that we can simultaneously download a gem while we surf the Internet and print a document. This concurrency is exposed to programmers in two fundamental forms: processes and threads. In ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required