added more threading locks

This commit is contained in:
itsmattkc
2019-09-11 00:01:42 +10:00
parent 6dc62a8703
commit a38d257800
2 changed files with 13 additions and 2 deletions
+7 -1
View File
@@ -175,7 +175,13 @@ void Node::ClearCachedValuesInParameters(const rational &start_range, const rati
QVariant Node::Run(NodeOutput* output, const rational& time)
{
return Value(output, time);
run_lock_.lock();
QVariant v = Value(output, time);
run_lock_.unlock();
return v;
}
NodeParam *Node::ParamAt(int index)
+6 -1
View File
@@ -281,10 +281,15 @@ private:
NodeOutput* last_processed_parameter_;
/**
* @brief Used for thread safety
* @brief Used for thread safety from main thread
*/
QMutex lock_;
/**
* @brief Used for thread safety between multiple threads
*/
QMutex run_lock_;
private slots:
void InputChanged(rational start, rational end);