cache: improved queue performance and stability

This commit is contained in:
itsmattkc
2021-03-25 16:57:15 +11:00
parent b137b8e0ac
commit 9b49bea096
6 changed files with 55 additions and 49 deletions
+6
View File
@@ -48,6 +48,12 @@ QVariant RenderTicket::Get()
return result_;
}
bool RenderTicket::HasStarted()
{
QMutexLocker locker(&lock_);
return started_;
}
bool RenderTicket::IsFinished(bool lock)
{
if (lock) {
+2
View File
@@ -52,6 +52,8 @@ public:
QVariant Get();
bool HasStarted();
bool IsFinished(bool lock = true);
bool WasCancelled();
+9
View File
@@ -70,6 +70,15 @@ bool RenderTicketWatcher::IsFinished()
}
}
bool RenderTicketWatcher::HasStarted()
{
if (ticket_) {
return ticket_->HasStarted();
} else {
return false;
}
}
void RenderTicketWatcher::WaitForFinished()
{
if (ticket_) {
+2
View File
@@ -44,6 +44,8 @@ public:
bool IsFinished();
bool HasStarted();
void WaitForFinished();
QVariant Get();