How to detach a thread on windows in C++
. On Posix
we have pthread_detach(pthread_self());
. How to achieve this in windows enviornment.
Assuming that you are using _beginthreadex or CreateThread
to create the thread, you just need to close the thread handle using CloseHandle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With