The pthread_detach() documentation says:
The
pthread_detach()function shall indicate to the implementation
that storage for the thread thread can be reclaimed when that thread
terminates.
What is the consequence if I create a joinable thread and do not detach or join it? The resources of that thread are not going to be reclaimed?
You answered your own question? A thread requires certain resources in the system. These will be kept until either the thread is joined, or it is detached and it terminates. (Until you detach the thread, the system must suppose that you will join it sometime in the future, and cannot free the resources.)