| 1422 | } |
| 1423 | |
| 1424 | void |
| 1425 | Node::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 | |
| 1465 | void |
| 1466 | Node::abortAnyProcessing_non_blocking() |
no test coverage detected