On Wed, 2007-01-17 at 11:02 +0900, Young H. wrote:
The program below reproduces the problem, and surprisingly, I only
use Mutex and ConditionVariable–no Queue.
I’ve reduced the test case you gave me down to:
require 'fastthread'
require 'thread'
mutex = Mutex.new
condition = ConditionVariable.new
t = Thread.new do
mutex.lock
condition.wait mutex
end
exit
The problem, in this case, appears to be coping with the mutex and
condition variable getting destroyed at program exit while there is
still a thread waiting on the condition variable.
Simple waits on mutexes do not appear to be affected; for instance, this
does not crash for me:
require 'fastthread'
require 'thread'
mutex = Mutex.new
mutex.lock
t = Thread.new do
mutex.lock
end
exit
I’m currently unsure whether it’s related to the other (non-exit-time)
crash or not.
-mental