Do handle exceptions in threads. Unhandled exceptions in threads, even background threads, generally terminate the process. There are three exceptions to this rule:
- A ThreadAbortException is thrown in a thread because Abort was called.
- An AppDomainUnloadedException is thrown in a thread because the application domain is being unloaded.
- The common language runtime or a host process terminates the thread.
For more information, see Exceptions in Managed Threads.
时间: 2024-09-27 19:06:02