laziness, impatience, and hubris | |
PerlMonks |
Re: Testing Race Conditionsby GrandFather (Saint) |
on Jul 03, 2007 at 11:29 UTC ( [id://624643]=note: print w/replies, xml ) | Need Help?? |
Inside of a single test open two db handles p and q. Initiate a transaction on p. Initiate a transaction on q. Commit the q transaction and check that it succeeds. Commit the p transaction and check that it fails. Trying to reproduce the actual race condition is likely to be very difficult, but checking that you have fixed the behavior that results from the race is deterministic and should be easy. If this doesn't solve your issue you need to tell us a little more about how the race condition arises, how likely it is to happen and how you propose to fix it. DWIM is Perl's answer to Gödel
In Section
Seekers of Perl Wisdom
|
|