We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8881e46 commit fcf5f30Copy full SHA for fcf5f30
1 file changed
Sofa/framework/Simulation/Core/src/sofa/simulation/task/WorkerThread.cpp
@@ -245,15 +245,15 @@ bool WorkerThread::addTask(Task *task)
245
246
bool WorkerThread::stealTask(Task **task)
247
{
248
- for (const auto it : m_taskScheduler->_threads)
+ for (const auto& [id, otherThread] : m_taskScheduler->_threads)
249
250
// if this is the main thread continue
251
- if (std::this_thread::get_id() == it.first)
+ if (std::this_thread::get_id() == id)
252
253
continue;
254
}
255
256
- WorkerThread *otherThread = it.second;
+ //WorkerThread *otherThread = it.second;
257
258
simulation::ScopedLock lock(otherThread->m_taskMutex);
259
if (!otherThread->m_tasks.empty())
0 commit comments