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:
@@ -76,6 +76,7 @@ void
|
||||
channel::close()
|
||||
{
|
||||
util::scoped_lock lock {m_close_lock};
|
||||
m_queue.clear();
|
||||
g_kernel_buffers.return_section(m_data);
|
||||
m_closed = true;
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ mailbox::close()
|
||||
|
||||
for (auto &p : m_pending) {
|
||||
delete p.val.msg;
|
||||
p.val.sender->wake(no_message);
|
||||
}
|
||||
m_queue.clear();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user