Previous | Next --- Slide 28 of 63
Back to Lecture Thumbnails
Xelblade

Instead of always locking based on the order of A and B, you can instead compare their memory addresses and always lock the lower memory address first to avoid this specific problem.