You cannot guarantee in .Net that two Thread
s run on two separate cores. In fact, you also cannot guarantee that one Thread
will run on only one core(!).
This is because managed threads are not the same as OS threads - a single managed Thread may use multiple OS threads to support it. In C#, you only ever deal directly with managed Thread
s (at least, without resorting to p/invoke to call the WinAPI threading functions, which you should never do).
However, the .Net and Windows thread schedulers are very good at what they do - they wouldn't run two threads on a single core while a second core sits completely idle. So, in general, you don't need to worry about it.