开发者

How to kill all running threads in Silverlight?

开发者 https://www.devze.com 2023-01-28 13:05 出处:网络
How开发者_如何学C to kill all running threads in Silverlight?You can\'t, the Abort method of a Thread object is marked as security critical and can\'t be called in Silverlight code.

How开发者_如何学C to kill all running threads in Silverlight?


You can't, the Abort method of a Thread object is marked as security critical and can't be called in Silverlight code.

If you want to kill the running of your own code then you could use the BackgroundWorker class to run the code and place reasonable checks in the code for CancellationPending being set. Other code can then call CancelAsync to terminate it.

0

精彩评论

暂无评论...
验证码 换一张
取 消