I have two threads exchanging with each other; each thread uses 'while (1) ..'. Now I need the threads to exit with a certain condition, and so we end the application.
My question is: is it safe to just “return (NULL)” from the thread, or do I need to use the functions “pthread_exit” or “pthread_join” as well?
source
share