<p>I have thus far avoided the nightmare that is testing multi-threaded code since it just seems like too much of a minefield.  I'd like to ask how people have gone about testing code that relies on threads for successful execution, or just how people have gone about testing those kinds of issues that only show up when two threads interact in a given manner?</p>

<p>This seems like a really key problem for programmers today, it would be useful to pool our knowledge on this one imho.</p>

I have had the unfortunate task of testing threaded code and they are definitely the hardest tests I have ever written.
When writing my tests, I used a combination of delegates and events.  Basically it is all about using
```
PropertyNotifyChanged
```
events with a
```
WaitCallback
```
or some kind of
```
ConditionalWaiter
```
that polls.
I am not sure if this was the best approach, but it has worked out for me.