Message74555
| Author |
hgibson50 |
| Recipients |
Rhamphoryncus, giampaolo.rodola, gregory.p.smith, hgibson50, jcea, pitrou, sserrano, vstinner |
| Date |
2008年10月09日.05:39:08 |
| SpamBayes Score |
0.007334151 |
| Marked as misclassified |
No |
| Message-id |
<1223530751.2.0.596667723237.issue3001@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> I doubt subclassability of RLock matters but who knows, people do code
> things.
I've recently done this to implement potential deadlock detection. I
keep a record of the sequences of acquired locks, find unique
sequences, then check for conflicts between each sequence. There's not
much overhead and it highlighted some potential deadlocks where lock A
and B were acquired AB in one route through code and BA in another
route. The algorithm is a simplified version of that used in Linux -
see http://www.mjmwired.net/kernel/Documentation/lockdep-design.txt
Hugh |
|