added more threading locks
This commit is contained in:
+7
-1
@@ -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
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user