From: MenTaLguY Date: 2007-07-14T09:12:09+09:00 Subject: Re: Which Hash methods are thread safe? On Sat, 14 Jul 2007 08:59:24 +0900, MenTaLguY wrote: > def publish(publisher, message) > @lock.synchronize do > @subscriptions[publisher] > end.each do |subscriber| > subscriber.deliver message > end > self > end Also, note that this allows the delivery of several messages from the same publisher to be interspersed (as would an R/W lock). You may need to think hard about whether that is okay for your purposes. -mental