Basically, if my thread completes between the
joinable
andjoin
calls, thenmy_thread.join
will wait forever?
No. A thread is still joinable after it has completed; it only becomes unjoinable once it has been joined or detached.
All threads must be joined or detached before the controlling thread
object is destroyed.