Debugging Locks and Deadlocks
Today I found myself in a problem I never guessed I would get into, deadlocks. A deadlock is a situation where one lock is waiting for another lock to clear. But the other lock can’t be cleared until the piece of code that’s currently is waiting for the lock to clear is run. More about Threads and Locks can be found here. And with a little bit of googling
Problem with deadlocks is the seem quite hard to find, and when found to solve. At the moment my program runs in a deadlock I press the Pauze button in Visual Studio, problem: Visual Studio stops at the position where the program is in the main thread. When using WPF in .NET Micro Framework this isn’t very usefull.
But I managed to find the piece of code that blocks but that doesn’t help a lot eather becouse you can’t see what piece of code currently holds the lock.
Recent Comments