WPF Multithreading

Demand: WPF when the main thread of some network operations such as database operations, will affect the interface cause Caton, GUI Caton;

Solution: the introduction of multi-threaded GUI Caton solve to solve the problem.

 

New thread

Thread thread = new Thread(ConnMySql);
thread.Start();

 

 

I understand the current thread specified function only once, after the execution is complete no longer performed, as there is no destruction of the thread is currently unknown.

Guess you like

Origin www.cnblogs.com/shyw/p/12093418.html