summaryrefslogtreecommitdiff
path: root/AK/CircularQueue.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-27 14:56:35 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-27 14:59:22 +0100
commit56f7b392c1868df085a39310148daa85a67e5e53 (patch)
tree34233a1868d4eb096b39556627b0716a34af765e /AK/CircularQueue.h
parenta2fe5f851785f001af92a204a926ded43eba4bad (diff)
downloadserenity-56f7b392c1868df085a39310148daa85a67e5e53.zip
WindowServer: Move the CPU usage graph updates to a secondary thread.
This avoids blocking the main thread on filesystem access, which created noticeable stutters during compilation.
Diffstat (limited to 'AK/CircularQueue.h')
-rw-r--r--AK/CircularQueue.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/AK/CircularQueue.h b/AK/CircularQueue.h
index 7ffc111bd3..7eb1ebf594 100644
--- a/AK/CircularQueue.h
+++ b/AK/CircularQueue.h
@@ -70,6 +70,8 @@ public:
ConstIterator begin() const { return ConstIterator(*this, m_head); }
ConstIterator end() const { return ConstIterator(*this, size()); }
+ int head_index() const { return m_head; }
+
private:
friend class ConstIterator;
T m_elements[Capacity];