mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-07 18:27:40 +08:00
Added a Flush method to the RunQueue
This commit is contained in:
parent
69ef267a77
commit
28ee8f42b2
@ -177,6 +177,13 @@ class RunQueue {
|
|||||||
// Can be called by any thread at any time.
|
// Can be called by any thread at any time.
|
||||||
bool Empty() const { return Size() == 0; }
|
bool Empty() const { return Size() == 0; }
|
||||||
|
|
||||||
|
// Delete all the elements from the queue.
|
||||||
|
void Flush() {
|
||||||
|
while (!Empty()) {
|
||||||
|
PopFront();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const unsigned kMask = kSize - 1;
|
static const unsigned kMask = kSize - 1;
|
||||||
static const unsigned kMask2 = (kSize << 1) - 1;
|
static const unsigned kMask2 = (kSize << 1) - 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user