I have to create procedure that will do fast close of multiple threads. My idea is to move all threads that has to be cancelled into new AppDomain, then abort all such threads and then unload that AppDomain.
Is that possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cannot move threads between app domains. Objects aren’t actually moved between them.
See Moving objects across AppDomains in .NET.
I believe you will just need to handle the thread objects yourself and cancel them as needed.