mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
lf_queue: remove explicit notify(), notify in push() instead
Should be cheap enough now if there are no waiters.
This commit is contained in:
parent
5624b001ae
commit
ac712bf4e3
2 changed files with 6 additions and 10 deletions
|
@ -363,11 +363,6 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void notify() noexcept
|
||||
{
|
||||
m_head.notify_one();
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
void push(Args&&... args)
|
||||
{
|
||||
|
@ -378,6 +373,12 @@ public:
|
|||
{
|
||||
item->m_link = reinterpret_cast<lf_queue_item<T>*>(_old);
|
||||
}
|
||||
|
||||
if (!_old)
|
||||
{
|
||||
// Notify only if queue was empty
|
||||
m_head.notify_one();
|
||||
}
|
||||
}
|
||||
|
||||
// Withdraw the list, supports range-for loop: for (auto&& x : y.pop_all()) ...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue