cache: improved queue performance and stability
This commit is contained in:
@@ -48,6 +48,12 @@ QVariant RenderTicket::Get()
|
||||
return result_;
|
||||
}
|
||||
|
||||
bool RenderTicket::HasStarted()
|
||||
{
|
||||
QMutexLocker locker(&lock_);
|
||||
return started_;
|
||||
}
|
||||
|
||||
bool RenderTicket::IsFinished(bool lock)
|
||||
{
|
||||
if (lock) {
|
||||
|
||||
@@ -52,6 +52,8 @@ public:
|
||||
|
||||
QVariant Get();
|
||||
|
||||
bool HasStarted();
|
||||
|
||||
bool IsFinished(bool lock = true);
|
||||
|
||||
bool WasCancelled();
|
||||
|
||||
@@ -70,6 +70,15 @@ bool RenderTicketWatcher::IsFinished()
|
||||
}
|
||||
}
|
||||
|
||||
bool RenderTicketWatcher::HasStarted()
|
||||
{
|
||||
if (ticket_) {
|
||||
return ticket_->HasStarted();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void RenderTicketWatcher::WaitForFinished()
|
||||
{
|
||||
if (ticket_) {
|
||||
|
||||
@@ -44,6 +44,8 @@ public:
|
||||
|
||||
bool IsFinished();
|
||||
|
||||
bool HasStarted();
|
||||
|
||||
void WaitForFinished();
|
||||
|
||||
QVariant Get();
|
||||
|
||||
Reference in New Issue
Block a user