autocommit 2022-04-20 14:58:34 CEST
This commit is contained in:
parent
c1773c0fee
commit
fa1ec0b36c
22 changed files with 583 additions and 185 deletions
|
|
@ -20,9 +20,10 @@ impl AsyncEvent {
|
|||
}
|
||||
|
||||
pub fn trigger(&self) {
|
||||
self.triggers.fetch_add(1);
|
||||
if let Some(waker) = self.waker.take() {
|
||||
waker.wake();
|
||||
if self.triggers.fetch_add(1) == 0 {
|
||||
if let Some(waker) = self.waker.take() {
|
||||
waker.wake();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue