5.5 Moving Ahead
In this chapter, we learned the following:
-
How important multithreading is when dealing with dRuby
-
How to use the
Thread
class and its different states. -
How to safely communicate among threads without causing data corruption or deadlock. There are various ways, such as
Thread.exclusive
,Mutex
,Monitor
, andQueue
.
In the next chapter, I’ll introduce another Ruby standard library that I created called Rinda. Rinda is built on top of dRuby and will be very useful when you want to communicate across different applications.
English edition
The dRuby Book: Distributed and Parallel Computing with Ruby
by Masatoshi Seki (Translated by Makoto Inoue)
Copyright (C) 2012 by Masatoshi Seki
Originally published by Pragmatic Programmers, LLC.
Original Japanese edition
dRuby ni yoru Bunsan Web Programming
by Masatoshi Seki
Copyright (C) 2005 by Masatoshi Seki
Published by Ohmsha, Ltd.
3-1 Kanda Nishikicho, Chiyodaku, Tokyo 101-8460
Japan
The adobe copyright notice shall be included in all copies.