This repository was archived by the owner on May 17, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,16 +33,16 @@ impl<A: sys::Adapter> RuntimeCompat<A> {
3333 return result;
3434 }
3535
36- let remaining_tasks = self . runtime . enter ( || self . runtime . run ( ) ) ;
36+ let mut remaining_tasks = self . runtime . enter ( || self . runtime . run ( ) ) ;
37+
38+ remaining_tasks |= self . runtime . flush ( ) ;
3739
3840 let timeout = if remaining_tasks {
3941 Some ( Duration :: ZERO )
4042 } else {
4143 self . runtime . current_timeout ( )
4244 } ;
4345
44- self . runtime . submit ( ) ;
45-
4646 match self . runtime . wait ( timeout) . await {
4747 Ok ( _) => { }
4848 Err ( e)
Original file line number Diff line number Diff line change @@ -17,13 +17,6 @@ cfg_if::cfg_if! {
1717pub trait Adapter : Sized + Deref < Target = Runtime > {
1818 fn new ( runtime : Runtime ) -> io:: Result < Self > ;
1919
20- fn submit ( & self ) {
21- // io-uring needs to be submitted before waiting.
22- if self . driver_type ( ) . is_iouring ( ) {
23- self . poll_with ( Some ( Duration :: ZERO ) ) ;
24- }
25- }
26-
2720 async fn wait ( & self , timeout : Option < Duration > ) -> io:: Result < ( ) > ;
2821
2922 fn clear ( & self ) -> io:: Result < ( ) > ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ async fn test_impl<A: Adapter>() {
88 let runtime = RuntimeCompat :: < A > :: new ( runtime) . unwrap ( ) ;
99 let buffer = runtime
1010 . execute ( async {
11- let mut file = File :: open ( "Cargo.toml" ) . await . unwrap ( ) ;
11+ let file = File :: open ( "Cargo.toml" ) . await . unwrap ( ) ;
1212 let ( _, buffer) = file. read_to_string_at ( String :: new ( ) , 0 ) . await . unwrap ( ) ;
1313 buffer
1414 } )
You can’t perform that action at this time.
0 commit comments