in reply to Re^2: How to simply terminate all running threads?
in thread How to simply terminate all running threads?
Would that be an unsafe tactic to just exit? Shouldn't I need to force all the threads to formally return and deallocate any resources before exiting the program?
No. They'll get cleaned up anyway when the process goes away.
I wouldn't recommend that for production code other than in exceptional circumstances; but for testing it ought to be fine.
|
|---|