MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / quitAnyProcessing_blocking

Method quitAnyProcessing_blocking

Engine/Node.cpp:1424–1463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1422}
1423
1424void
1425Node::quitAnyProcessing_blocking(bool allowThreadsToRestart)
1426{
1427 {
1428 QMutexLocker k(&_imp->nodeIsDequeuingMutex);
1429 if (_imp->nodeIsDequeuing) {
1430 _imp->nodeIsDequeuing = false;
1431
1432 //Attempt to wake-up sleeping threads of the thread pool
1433 _imp->nodeIsDequeuingCond.wakeAll();
1434 }
1435 }
1436
1437
1438 //If this effect has a RenderEngine, make sure it is finished
1439 OutputEffectInstance* isOutput = dynamic_cast<OutputEffectInstance*>( _imp->effect.get() );
1440
1441 if (isOutput) {
1442 RenderEnginePtr engine = isOutput->getRenderEngine();
1443 assert(engine);
1444 engine->quitEngine(allowThreadsToRestart);
1445 engine->waitForEngineToQuit_enforce_blocking();
1446 }
1447
1448 //Returns when the preview is done computign
1449 _imp->abortPreview_blocking(allowThreadsToRestart);
1450
1451 TrackerContextPtr trackerContext = getTrackerContext();
1452 if (trackerContext) {
1453 trackerContext->quitTrackerThread_blocking(allowThreadsToRestart);
1454 }
1455
1456 if ( isRotoPaintingNode() ) {
1457 NodesList rotopaintNodes;
1458 getRotoContext()->getRotoPaintTreeNodes(&rotopaintNodes);
1459 for (NodesList::iterator it = rotopaintNodes.begin(); it != rotopaintNodes.end(); ++it) {
1460 (*it)->quitAnyProcessing_blocking(allowThreadsToRestart);
1461 }
1462 }
1463}
1464
1465void
1466Node::abortAnyProcessing_non_blocking()

Callers 5

handleBlockingTaskMethod · 0.80
quitNowMethod · 0.80
resetMethod · 0.80
closeProject_blockingMethod · 0.80

Calls 8

quitEngineMethod · 0.80
abortPreview_blockingMethod · 0.80
getRotoPaintTreeNodesMethod · 0.80
getMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected