// called when the thread exits - in the context of this thread
//
// NB: this function will not be called if the thread is Kill()ed
// called when the thread exits - in the context of this thread
//
// NB: this function will not be called if the thread is Kill()ed