The other day I discovered that Thread::waitForThreadToExit() calls sleep() internally. I discovered this by way of crash, where sleep() would return at a time the Thread object had already disappeared. And, digging a little deeper, I also found that threads are created detached, making joining impossible. Since I have used [p]thread_join() (or WaitForXYZ() on Windows) quite happily in a variety of languages, I am wondering why JUCE does not expose the join functionality? Using sleep() in a thread primitive certainly seems brittle.