From: ara.t.howard@... Date: 2006-07-06T07:43:54+09:00 Subject: Re: thread mystery On Thu, 6 Jul 2006, Eric Hodel wrote: > Why aren't those threads getting GC'd? this is pretty suspect file: sync.rb 245 def sync_initialize 246 @sync_mode = UN 247 @sync_waiting = [] 248 @sync_upgrade_waiting = [] 249 @sync_sh_locker = Hash.new 250 @sync_ex_locker = nil 251 @sync_ex_count = 0 252 end 253 254 def initialize(*args) 255 sync_initialize 256 super 257 end 258 259 def sync_try_lock_sub(m) 260 case m 261 when SH 262 case sync_mode 263 when UN 264 self.sync_mode = m 265 sync_sh_locker[Thread.current] = 1 266 ret = true note that unlocking never releases the reference! i'm going to test a patch using something like 249 @sync_sh_locker = Hash.new{|h,k| h[k] = 1} 265 sync_sh_locker.delete Thread.current ... more later ... -a -- suffering increases your inner strength. also, the wishing for suffering makes the suffering disappear. - h.h. the 14th dali lama