mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-27 06:09:02 +02:00
prepare rt release
This commit is contained in:
@ -159,11 +159,11 @@ pub(crate) struct AsyncSystemRunner {
|
||||
impl AsyncSystemRunner {
|
||||
/// This function will start event loop and returns a future that
|
||||
/// resolves once the `System::stop()` function is called.
|
||||
pub(crate) fn run_nonblocking(self) -> Box<Future<Item = (), Error = io::Error> + Send + 'static> {
|
||||
pub(crate) fn run_nonblocking(self) -> impl Future<Item = (), Error = io::Error> + Send {
|
||||
let AsyncSystemRunner { stop, .. } = self;
|
||||
|
||||
// run loop
|
||||
Box::new(future::lazy(|| {
|
||||
future::lazy(|| {
|
||||
Arbiter::run_system();
|
||||
stop.then(|res| match res {
|
||||
Ok(code) => {
|
||||
@ -182,7 +182,7 @@ impl AsyncSystemRunner {
|
||||
Arbiter::stop_system();
|
||||
result
|
||||
})
|
||||
}))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ use futures::Future;
|
||||
use tokio_current_thread::Handle;
|
||||
|
||||
use crate::arbiter::{Arbiter, SystemCommand};
|
||||
use crate::builder::{AsyncSystemRunner, Builder, SystemRunner};
|
||||
use crate::builder::{Builder, SystemRunner};
|
||||
|
||||
static SYSTEM_COUNT: AtomicUsize = AtomicUsize::new(0);
|
||||
|
||||
@ -64,7 +64,7 @@ impl System {
|
||||
pub fn run_in_executor<T: Into<String>>(
|
||||
name: T,
|
||||
executor: Handle,
|
||||
) -> Box<Future<Item = (), Error = io::Error> + Send + 'static> {
|
||||
) -> impl Future<Item = (), Error = io::Error> + Send {
|
||||
Self::builder()
|
||||
.name(name)
|
||||
.build_async(executor)
|
||||
|
Reference in New Issue
Block a user