Killing all threads that opened by application

后端 未结 7 838
长发绾君心
长发绾君心 2020-12-06 03:58

I have some really big application mixture of c# and j#.

Sometimes when I close it, there are some threads that are not closed and they are hanging in the task mana

相关标签:
7条回答
  • 2020-12-06 04:50
    internal void Close()
    {
        Dispatcher.CurrentDispatcher.Thread.Abort();
        Application.Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;
        Application.Current.Shutdown();
    }
    
    0 讨论(0)
提交回复
热议问题