I am writing a unit test for some thread locking logic, so as to make the test more likely to fail quickly; I wish to have all the threads switch between each other very often and at random times.
I know this will not prove we don’t have any bugs, but at least it should make the bugs show up more often.
Thanks to everyone saying "don't do this", but I have very simple locking that should never fail and we only have unit tests in place at present. Anything to reduce the risk of someone removing the lockings without understanding what they are doing is worth while.