Multithread a unit test
问题 In order to test concurrency issues, I want to call the same method on two different threads at exactly the same time using a unit test. In fact I probably want to call the same method on several threads at the same time. I'm using Microsoft's built in unit tester for VS2008. My thoughts are that I would lock an object and then synchronously setup each of the threads which would immediately wait on the lock and then release the lock which would allow all threads to access the shared resources