In the previous tutorials
I showed how LID
, our deadlock detection tools, could be used to pinpoint lock inversions, show you deadlocks which are lurking in your code and save you hours of debugging time. The examples used so far are very simple and all of the locks are acquired on the same thread. The tools recognise that although these are
lock inversions they're benign as only one thread ever acquires the locks in each sequence and a single thread cannot deadlock itself (unless it's using locks which are not re-entrant!).
To help reduce potential clutter from the output you can suppress single threaded lock inversions using the
command line switch.
Personally I prefer to remove ALL lock order inversions but if you want to ignore single threaded inversions then you can.