Code Like this:
I need in main thread to stop this thread without wait, just stop it and set ptr to null. so it is destroy self later. Is this code work?