Ability to set/pass a "name" to juce::ThreadPool

Ability to set/pass a “name” to juce::ThreadPool’s juce::ThreadPool::ThreadPoolThread.

We have a few juce::ThreadPool(s) going and sometimes it’s really hard to figure which one of the juce::ThreadPool::ThreadPoolThread(s) we failed at, especially on release builds.

Ooh, good idea. The ThreadPool could have a name field, and the function ThreadPool::createThreads() could combine the index (String(i)) and the referenced ThreadPool’s name to provide a better name than “Pool” when creating each Thread.

yeah, i always end up patching juce because of that :smiley:

Here’s something we ended up doing recently triggered by a very painful macOS crash log debug session.

2 Likes