You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ticks indicate whether event have happened, after record ticks we register event to reactor and return Pending. if event happen immediately, tick will be:
let tick = self.reactor.ticker.fetch_add(1,Ordering::SeqCst).wrapping_add(1);
because reactor block on wait, which will cause ticks.0 equal to tick when we wake this task. and we reregister event to reactor and wake again. this time ticks.0 increase 1, and we return Poll::Ready now.
IMO ticks.0 is useless maybe we can just use ticks.1 to indicate whether event has happened. or we can set state[dir].tick = tick + 1.
The text was updated successfully, but these errors were encountered:
ticks indicate whether event have happened, after record ticks we register event to reactor and return Pending. if event happen immediately, tick will be:
because reactor block on wait, which will cause ticks.0 equal to tick when we wake this task. and we reregister event to reactor and wake again. this time ticks.0 increase 1, and we return Poll::Ready now.
IMO ticks.0 is useless maybe we can just use ticks.1 to indicate whether event has happened. or we can set
state[dir].tick = tick + 1
.The text was updated successfully, but these errors were encountered: