Are there any guidelines for testing multi-threaded code (other than throwing a bunch of threads at the problem and crossing your fingers).
I'm basically looking for good ways to test for data corruption, deadlocks, and other concurrency issues. Essentially I want to be able to prove that the code is thread-safe via a test.
Are there any frameworks in Java that let you easily write tests for a multithreaded scenario?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…