From: Bryan Richardson Date: 2008-07-26T01:22:53+09:00 Subject: Re: Monitor Error when Joining Threads All, So this doesn't have anything to do with Thread.join and such... it instead has to do with some synchronization I'm doing in another class. Here's what it looks like: class StatsTracker < Monitor include Singleton ... def foo synchronize do # do something end end ... end I get an error at the 'synchronize do' line similar to what I describe in my first post, essentially saying @mon_count is nil. I tried including MonitorMixin vs extending Monitor, but that didn't fix the problem. I then tried doing the following and it worked: class StatsTracker include Singleton def initialize @semaphore = Mutex.new end ... def foo @semaphore.synchronize do # do something end end ... end Does anyone know what I'm doing wrong to make the Monitor approach not work? -- Thanks! Bryan -- Posted via http://www.ruby-forum.com/.