标签:tar patch div wpf sleep reads nbsp param invoke
Thread tr0 = new Thread(new ParameterizedThreadStart((obj1) => { lock (aaa) { Thread.Sleep(3000); this.Dispatcher.Invoke(new Action(() => { Thread.Sleep(3000); })); } })); tr0.IsBackground = true; tr0.Start(); Thread.Sleep(3000); lock (aaa) { Thread.Sleep(3000); }
在线程里面访问主线程,主线程和线程共用一把锁互相等待导致死锁。
标签:tar patch div wpf sleep reads nbsp param invoke
原文地址:http://www.cnblogs.com/yangleiWPF/p/6239503.html