mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Don't enforce creating at least one worker thread in TaskDispatch.
Everything can be confined to a single thread that does job dispatch, and then waits for the jobs to finish. TaskDispatch has always executed outstanding work during this wait, so no workers are needed.
This commit is contained in:
parent
58a6f703af
commit
d6c5d3f6db
@ -11,8 +11,6 @@ TaskDispatch::TaskDispatch( size_t workers, const char* name )
|
||||
: m_exit( false )
|
||||
, m_jobs( 0 )
|
||||
{
|
||||
assert( workers >= 1 );
|
||||
|
||||
m_workers.reserve( workers );
|
||||
for( size_t i=0; i<workers; i++ )
|
||||
{
|
||||
|
@ -18,9 +18,9 @@ TimelineController::TimelineController( View& view, Worker& worker, bool threadi
|
||||
, m_view( view )
|
||||
, m_worker( worker )
|
||||
#ifdef __EMSCRIPTEN__
|
||||
, m_td( 1 )
|
||||
, m_td( 0 )
|
||||
#else
|
||||
, m_td( threading ? std::max( 1u, std::thread::hardware_concurrency() - 2 ) : 1, "Render" )
|
||||
, m_td( threading ? (size_t)std::max( 0, (int)std::thread::hardware_concurrency() - 2 ) : 0, "Render" )
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user