mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
ircd:🆑 Prevent notify to same context in callback.
This commit is contained in:
parent
383637ae51
commit
c34045c9d8
1 changed files with 3 additions and 0 deletions
|
@ -881,6 +881,9 @@ noexcept
|
|||
std::exchange(hdata->c, nullptr)
|
||||
};
|
||||
|
||||
if(likely(c == ctx::current))
|
||||
return;
|
||||
|
||||
ctx::notify(*c);
|
||||
std::atomic_thread_fence(std::memory_order_release);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue