Open
Description
Currently, async_support::spawn
accepts an impl Future<Output = ()>
, but it should probably take something like impl Future<Output = anyhow::Result<()>>
instead, since the most common cases for spawned Future
s involve fallible I/O, and forcing the application to .unwrap()
(and thus trap) on any error is not a great default experience.
In the case where such a Future
returns an error, we can convert it to a debug string, pass that string to ErrorContext::new
, and then close any open stream
s and/or future
s (read or write ends) with that error-context
.