Closed ids1024 closed 8 months ago
It looks like in both cases, removing if self.notified.swap(true, Ordering::SeqCst) { return; }
fixes this. Though that logic seems reasonable. Hm.
Ah, so if schedule
is called in the callback invoked by process_events
, that will set notified
to true
(which had been cleared to false
at the start of process_events
, and send a ping. But the if clear_readiness { ... }
block results in that ping being ignored, but doesn't set notified
to false
.
Not sure exactly what's going on, but some code I have trying to use calloops
Executor
doesn't always end up running the scheduled tasks. Adding a print to the start of theasync {
block shows it never starts. Using a different executor doesn't have this problem.Here's a minimal case where I see an issue like this. It's not really reflective of exactly what I was doing where I ran into this, but it's an interesting case, where
"Baz"
surely should be printed, but isn't: