O'Reilly logo

Sams Teach Yourself Ruby in 21 Days by Mark Slagell

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

Threads

Programming with concurrent processes is an old and well-understood practice, but it is rapidly falling out of favor, because a more efficient technique has been developed in recent years.

Remember that when a process undergoes a fork, it creates a copy of itself. Surely that's overkill, though. When you're reading a truly fascinating book and the telephone rings, you don't clone yourself so there can be one of you attending to the phone and the other attending to your reading. Instead you put your finger on the page so as not to lose your place, reach over with the other hand to grab the phone, and chatter politely (mm hmm, mm hmm), glancing back down at the book every chance you get. See how much reading you can still get done? And ...

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