当前位置:网站首页>Close a thread

Close a thread

2022-06-25 08:50:00 Sir, silence first

Close a thread

A problem I encountered a long time ago , At that time, the thread was not shut down at the beginning , But now the program will crash if the thread is handled in the same way as before .

Use Abort Throw an exception to stop the thread .

This is a common operation , At the same time, pay attention to the use of Abort To stop the thread in .NET 5.0 Then you can't use it , If you want to use it, you will throw an error .
Can be found in Microsoft documentation Microsoft's official documentation wormhole

 The code doesn't have 

 Insert picture description here

原网站

版权声明
本文为[Sir, silence first]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206250801477941.html