draw main brush preview first if the queue is long

This commit is contained in:
2019-03-02 19:08:11 +01:00
parent 62e037dd1a
commit 9a9d018ffb
5 changed files with 8 additions and 5 deletions

View File

@@ -173,7 +173,7 @@ public:
q.push_back(pkt);
get_cv.notify_one();
}
void PostUnique(T pkt)
void PostUnique(T pkt, bool top)
{
std::unique_lock<std::mutex> lock(mutex);
if (Max > 0)
@@ -182,7 +182,7 @@ public:
if (q.size() >= Max) return;
}
if (std::find(q.begin(), q.end(), pkt) == q.end());
q.push_back(pkt);
top ? q.push_front(pkt) : q.push_back(pkt);
get_cv.notify_one();
}
T Get()