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

Method quitAnyProcessing_blocking

Engine/Node.cpp:2631–2670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2629}
2630
2631void
2632Node::quitAnyProcessing_blocking(bool allowThreadsToRestart)
2633{
2634 {
2635 QMutexLocker k(&_imp->nodeIsDequeuingMutex);
2636 if (_imp->nodeIsDequeuing) {
2637 _imp->nodeIsDequeuing = false;
2638
2639 //Attempt to wake-up sleeping threads of the thread pool
2640 _imp->nodeIsDequeuingCond.wakeAll();
2641 }
2642 }
2643
2644
2645 //If this effect has a RenderEngine, make sure it is finished
2646 OutputEffectInstance* isOutput = dynamic_cast<OutputEffectInstance*>( _imp->effect.get() );
2647
2648 if (isOutput) {
2649 boost::shared_ptr<RenderEngine> engine = isOutput->getRenderEngine();
2650 assert(engine);
2651 engine->quitEngine(allowThreadsToRestart);
2652 engine->waitForEngineToQuit_enforce_blocking();
2653 }
2654
2655 //Returns when the preview is done computign
2656 _imp->abortPreview_blocking(allowThreadsToRestart);
2657
2658 boost::shared_ptr<TrackerContext> trackerContext = getTrackerContext();
2659 if (trackerContext) {
2660 trackerContext->quitTrackerThread_blocking(allowThreadsToRestart);
2661 }
2662
2663 if ( isRotoPaintingNode() ) {
2664 NodesList rotopaintNodes;
2665 getRotoContext()->getRotoPaintTreeNodes(&rotopaintNodes);
2666 for (NodesList::iterator it = rotopaintNodes.begin(); it != rotopaintNodes.end(); ++it) {
2667 (*it)->quitAnyProcessing_blocking(allowThreadsToRestart);
2668 }
2669 }
2670}
2671
2672void
2673Node::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