hold worker busy state in renderbackend rather than in renderworker
Workers run in different threads and the backends can poll whether the worker is currently busy or not. However the previous iteration has the worker (and an atomic int) provide the busy state which could easily desync with the main thread (since all workers run in different threads). By holding the busy states in the main thread, the main thread will always be able to poll the busy state accurately.
This commit is contained in:
@@ -20,8 +20,6 @@ public:
|
||||
|
||||
bool IsStarted();
|
||||
|
||||
bool IsAvailable();
|
||||
|
||||
public slots:
|
||||
void Close();
|
||||
|
||||
@@ -30,8 +28,6 @@ public slots:
|
||||
NodeValueTable RenderAsSibling(NodeDependency dep);
|
||||
|
||||
signals:
|
||||
void RequestSibling(NodeDependency path);
|
||||
|
||||
void CompletedCache(NodeDependency dep, NodeValueTable data);
|
||||
|
||||
protected:
|
||||
@@ -56,8 +52,6 @@ protected:
|
||||
|
||||
virtual NodeValueTable RenderBlock(TrackOutput *track, const TimeRange& range) = 0;
|
||||
|
||||
QAtomicInt working_;
|
||||
|
||||
private:
|
||||
bool started_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user