Provides AsyncWrite with flush
As per Tokio and others, this commit provides a `poll_flush` method on `AsyncWrite` so that a best-effort attempt at wakening once all bytes are flushed can be made.
This commit is contained in:
@ -61,5 +61,8 @@ async fn main(_spawner: Spawner, p: Peripherals) {
|
||||
info!("writing...");
|
||||
unwrap!(u.write_all(&buf).await);
|
||||
info!("write done");
|
||||
|
||||
// Wait until the bytes are actually finished being transmitted
|
||||
unwrap!(u.flush().await);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user