[.net] Garbage Collector suspended while holding Mutex = Deadlock

Started by
0 comments, last by Shannon Barber 16 years ago
Hi there, I recently came across a deadlock problem where the GC would try to delete an object, acquires a mutex related to this operation, but in the process, the GC thread would go into suspend. Now the main thread runs and tries to lock the same mutex the GC just locked, spins on this forever and the GC won't go out of suspend. Does anyone have insight into problems like this with the Garbage Collector for C#?
-=~''^''~=-.,_Wicked_,.-=~''^''~=-
Advertisement
Sorry I don't have a solution, but would I be correct in concluding you taking a mutex in the dispose methods of some of your classes?
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement