task: Fix first frame on task chain missed by PStats

This commit is contained in:
rdb 2025-01-22 22:14:01 +01:00
parent 91f124e2f1
commit 674fa4480b
1 changed files with 3 additions and 0 deletions

View File

@ -1438,6 +1438,9 @@ AsyncTaskChainThread(const string &name, AsyncTaskChain *chain) :
void AsyncTaskChain::AsyncTaskChainThread::
thread_main() {
#ifdef HAVE_THREADS
// Let PStats know this thread exists.
PStatClient::thread_tick();
MutexHolder holder(_chain->_manager->_lock);
while (_chain->_state != S_shutdown && _chain->_state != S_interrupted) {
thread_consider_yield();