mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-28 20:03:22 +00:00
Add wait_until_* functionality to Waiter
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
6a5a5b4d3d
commit
1873bb7a3f
@ -59,7 +59,7 @@ fn spawn_background_poll_thread(iface: Arc<Iface>) {
|
||||
}
|
||||
|
||||
let duration = Duration::from_millis(next_poll_at_ms - now_as_ms);
|
||||
wait_queue.wait_until_or_timeout(
|
||||
let _ = wait_queue.wait_until_or_timeout(
|
||||
// If `iface_ext.next_poll_at_ms()` changes to an earlier time, we will end the
|
||||
// waiting.
|
||||
|| (iface_ext.next_poll_at_ms()? < next_poll_at_ms).then_some(()),
|
||||
|
Reference in New Issue
Block a user