1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-27 18:02:58 +01:00

prepare rt release

This commit is contained in:
Nikolay Kim 2019-06-22 09:02:17 +06:00
parent 1c04ad3238
commit 07708c5e9a
4 changed files with 17 additions and 7 deletions

View File

@ -1,11 +1,19 @@
# Changes
## [0.2.3] - 2019-06-22
### Added
* Allow to start System using exsiting CurrentThread Handle #22
## [0.2.2] - 2019-03-28
### Changed
* Moved `blocking` module to `actix-threadpool` crate
## [0.2.1] - 2019-03-11
### Added
@ -16,12 +24,14 @@
* Arbiter::exec - execute fn on the arbiter's thread and wait result
## [0.2.0] - 2019-03-06
* `run` method returns `io::Result<()>`
* Removed `Handle`
## [0.1.0] - 2018-12-09
* Initial release

View File

@ -1,6 +1,6 @@
[package]
name = "actix-rt"
version = "0.2.2"
version = "0.2.3"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actix runtime"
keywords = ["network", "framework", "async", "futures"]
@ -18,7 +18,7 @@ name = "actix_rt"
path = "src/lib.rs"
[dependencies]
actix-threadpool = "0.1.0"
actix-threadpool = "0.1.1"
futures = "0.1.25"
tokio-current-thread = "0.1"
tokio-executor = "0.1.5"

View File

@ -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
})
}))
})
}
}

View File

@ -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)