We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The executor trait looks like this:
pub trait Executor { fn spawn_obj( &mut self, future: FutureObj<'static, ()>, ) -> Result<(), SpawnObjError>; fn status(&self) -> Result<(), SpawnErrorKind> { ... } // Planned fn spawn( &mut self, future: dyn Future<Output = ()> + Send + 'static, ) -> Result<(), SpawnError> { ... } }
And here's how using it looks like (uses upcoming boxed combinator):
boxed
ctx.executor().spawn_obj(future.boxed().into()); // Planned ctx.executor().spawn(future);
I would like to define ExecutorExt:
ExecutorExt
pub trait ExecutorExt { fn spawn_obj_with_handle<T>( &mut self, future: FutureObj<'static, T>, ) -> Result<JoinHandle<T>, SpawnObjError>; // Planned fn spawn_with_handle<T>( &mut self, future: dyn Future<Output = T> + Send + 'static, ) -> Result<JoinHandle<T>, SpawnError>; }
TL;DR Move our existing spawn_with_handle function into ExecutorExt
spawn_with_handle
The text was updated successfully, but these errors were encountered:
Closed by #1156
Sorry, something went wrong.
No branches or pull requests
The executor trait looks like this:
And here's how using it looks like (uses upcoming
boxed
combinator):I would like to define
ExecutorExt
:TL;DR Move our existing
spawn_with_handle
function intoExecutorExt
The text was updated successfully, but these errors were encountered: