mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Just one compression worker thread on emscripten.
This commit is contained in:
parent
d33c7e5508
commit
dff45f1dc1
@ -1445,9 +1445,13 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
||||
alignas(64) std::atomic<State> state = Available;
|
||||
};
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
const int jobs = 1;
|
||||
#else
|
||||
// Leave one thread for file reader, second thread for dispatch (this thread)
|
||||
// Minimum 2 threads to have at least two buffers (one in use, second one filling up)
|
||||
const auto jobs = std::max<int>( std::thread::hardware_concurrency() - 2, 2 );
|
||||
#endif
|
||||
auto td = std::make_unique<TaskDispatch>( jobs );
|
||||
auto data = std::make_unique<JobData[]>( jobs );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user