mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[kernel] Add clear() method to wait_queue
Allow objects to clear out the wait_queue earlier than waiting for the destructor by moving that functionality into wait_queue::clear().
This commit is contained in:
@@ -37,6 +37,9 @@ public:
|
||||
/// Get the spinlock to lock this queue
|
||||
util::spinlock & get_lock() { return m_lock; }
|
||||
|
||||
/// Wake and clear out all threads.
|
||||
void clear();
|
||||
|
||||
private:
|
||||
/// Get rid of any exited threads that are next
|
||||
/// in the queue. Caller must hold the queue lock.
|
||||
|
||||
Reference in New Issue
Block a user