Sounds broken to me. Has it always been that way?
BTW, what happens if I explicitly destroy a mutex, which is locked?
/ Niels Möller ()
Previous text:
2002-10-27 15:15: Subject: References to Thread.Mutex
It turned out to be caused by the mutex lock object that doesn't hold a reference to the mutex, and the lock is destructed when the mutex is refcount garbed before the call to wait(). (I still don't know what difference is causing the destruct to consistently be sufficiently delayed for me but not for Nilsson.)
Anyway, what is the reason behind the design that MutexKeys doesn't reference their Mutexes? It could potentially cause problems in more relevant cases than this, e.g. during a shutdown sequence if the object containing the mutex is gc'd while there still are several threads that is waiting to get a lock.
/ Martin Stjernholm, Roxen IS