On Mon, Sep 30, 2013 at 5:13 PM, headius (Charles Nutter) <
headius / headius.com> wrote:
> and the code should use Monitor instead of Mutex so it can be reentrant.
I'm trying to think of a case in which this would matter. Since it's
wrapping another object, we don't have to worry about the case where a
synced method calls another synced method on self.
Hmmm... I guess there's the case where synced_obj.foo receives a block, and
someone calls synced_obj.bar within that block.
I only bring this up because Monitor introduces a (small?) performance hit
over Mutex.
--
Avdi Grimm
http://avdi.org
I only check email twice a day. to reach me sooner, go to
http://awayfind.com/avdi