Multithreading exception and Dispose. Why Dispose didn't call?
问题 'using' statement guaranteed that for the object will be called Dispose method. In this example this is not happening. And finalizer method didn't call too. Why all this? And how I can change code for guaranteed disposing of my objects when exceptions on other threads can happens? class Program { static void Main(string[] args) { Thread th1 = new Thread(ThreadOne); Thread th2 = new Thread(ThreadTwo); th1.Start(); th2.Start(); th1.Join(); th2.Join(); } static void ThreadOne() { using