tweak changelog

This commit is contained in:
Rob Ede 2021-09-02 01:01:45 +01:00
parent 931690d387
commit 5db9ba69a8
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
7 changed files with 30 additions and 36 deletions

View File

@ -1,7 +1,7 @@
# Changes
## Unreleased - 2021-xx-xx
* Add `io-uring` feature for enabling async file Io on linux system. [#374]
* Add `io-uring` feature for enabling async file I/O on linux. [#374]
* The `spawn` method can now resolve with non-unit outputs. [#369]
[#369]: https://github.com/actix/actix-net/pull/369

View File

@ -29,7 +29,7 @@ actix-macros = { version = "0.2.0", optional = true }
futures-core = { version = "0.3", default-features = false }
tokio = { version = "1.3", features = ["rt", "net", "parking_lot", "signal", "sync", "time"] }
[target."cfg(target_os = \"linux\")".dependencies]
[target.'cfg(target_os = "linux")'.dependencies]
tokio-uring = { version = "0.1", optional = true }
[dev-dependencies]

View File

@ -91,11 +91,11 @@ pub struct Arbiter {
}
impl Arbiter {
#[cfg(any(not(target_os = "linux"), not(feature = "io-uring")))]
/// Spawn a new Arbiter thread and start its event loop.
///
/// # Panics
/// Panics if a [System] is not registered on the current thread.
#[cfg(any(not(target_os = "linux"), not(feature = "io-uring")))]
#[allow(clippy::new_without_default)]
pub fn new() -> Arbiter {
Self::with_tokio_rt(|| {
@ -104,10 +104,10 @@ impl Arbiter {
})
}
#[cfg(any(not(target_os = "linux"), not(feature = "io-uring")))]
/// Spawn a new Arbiter using the [Tokio Runtime](tokio-runtime) returned from a closure.
///
/// [tokio-runtime]: tokio::runtime::Runtime
#[cfg(any(not(target_os = "linux"), not(feature = "io-uring")))]
#[doc(hidden)]
pub fn with_tokio_rt<F>(runtime_factory: F) -> Arbiter
where
@ -159,11 +159,11 @@ impl Arbiter {
Arbiter { tx, thread_handle }
}
#[cfg(all(target_os = "linux", feature = "io-uring"))]
/// Spawn a new Arbiter thread and start its event loop with `tokio-uring` runtime.
///
/// # Panics
/// Panics if a [System] is not registered on the current thread.
#[cfg(all(target_os = "linux", feature = "io-uring"))]
#[allow(clippy::new_without_default)]
pub fn new() -> Arbiter {
let sys = System::current();
@ -211,7 +211,7 @@ impl Arbiter {
Arbiter { tx, thread_handle }
}
/// Sets up an Arbiter runner in a new System using the provided runtime local task set.
/// Sets up an Arbiter runner in a new System using the environment's local set.
pub(crate) fn in_new_system() -> ArbiterHandle {
let (tx, rx) = mpsc::unbounded_channel();

View File

@ -32,6 +32,10 @@
//! arbiter.stop();
//! arbiter.join().unwrap();
//! ```
//!
//! # `io-uring` Support
//! There is experimental support for using io-uring with this crate by enabling the
//! `io-uring` feature. For now, it is semver exempt.
#![deny(rust_2018_idioms, nonstandard_style)]
#![allow(clippy::type_complexity)]

View File

@ -54,7 +54,6 @@ impl System {
let (sys_tx, sys_rx) = mpsc::unbounded_channel();
let rt = Runtime::from(runtime_factory());
let sys_arbiter = rt.block_on(async { Arbiter::in_new_system() });
let system = System::construct(sys_tx, sys_arbiter.clone());

View File

@ -328,16 +328,8 @@ fn spawn_local() {
}
#[cfg(all(target_os = "linux", feature = "io-uring"))]
mod linux_only {
use std::sync::{
atomic::{AtomicBool, Ordering},
Arc,
};
use super::*;
#[test]
fn tokio_uring_arbiter() {
#[test]
fn tokio_uring_arbiter() {
let system = System::new();
let (tx, rx) = std::sync::mpsc::channel();
@ -362,5 +354,4 @@ mod linux_only {
assert!(rx.recv().unwrap());
drop(system);
}
}

View File

@ -3,7 +3,7 @@
## Unreleased - 2021-xx-xx
* Remove `config` module. `ServiceConfig`, `ServiceRuntime` public types are removed due to this change. [#349]
* Remove `ServerBuilder::configure` [#349]
* Add `io-uring` feature for enabling async file Io on linux system. [#374]
* Add `io-uring` feature for enabling async file I/O on linux. [#374]
[#349]: https://github.com/actix/actix-net/pull/349
[#374]: https://github.com/actix/actix-net/pull/374