Skip to content

Commit

Permalink
Adapt the thread pool to the number of concurrent threads
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfd committed Oct 6, 2020
1 parent 1e2ae6b commit a0ad3b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sfizz/FilePool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#endif
#include "threadpool/ThreadPool.h"
using namespace std::placeholders;
static ThreadPool threadPool { sfz::config::numBackgroundThreads };
static ThreadPool threadPool { std::thread::hardware_concurrency() > 2 ? std::thread::hardware_concurrency() - 2 : 1 };

void readBaseFile(sfz::AudioReader& reader, sfz::FileAudioBuffer& output, uint32_t numFrames)
{
Expand Down

0 comments on commit a0ad3b9

Please sign in to comment.