>general way to externally terminate a thread of execution
There's really no safe way to cover all cases unless you create a really scoped down interface that are explicit in what they do.
One use case might allow abrupt interruption with no cleanup (like in the case the OS is powering down) and another interrupt it might be imperative to cleanup (a long running program that can leak resources)
There's really no safe way to cover all cases unless you create a really scoped down interface that are explicit in what they do.
One use case might allow abrupt interruption with no cleanup (like in the case the OS is powering down) and another interrupt it might be imperative to cleanup (a long running program that can leak resources)