Open
Conversation
Replace vec-arena with slab
Bump to v1.4.1
Since Rust 1.64, Clippy respects `rust-version` field in Cargo.toml. rust-lang/rust@b776fb8
* m: Migrate to criterion * Update CI
async-lock 2.7.0 requires Rust 1.48.
```
error[E0658]: use of unstable library feature 'future_readiness_fns'
--> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/async-lock-2.7.0/src/once_cell.rs:430:45
|
430 | self.initialize_or_wait(move || std::future::ready(closure()), &mut Blocking),
| ^^^^^^^^^^^^^^^^^^
|
```
For example:
warning: unresolved link to `tick`
--> src/static_executors.rs:306:47
|
306 | /// to consistently drive the executor with [`tick`] or [`run`] will cause the all spawned
| ^^^^ no item named `tick` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
Fix build badge
Signed-off-by: John Nunley <dev@notgull.net>
Closes #135. This enables the executor to be used in presence of panics in user callbacks, such as the iterator and `impl Extend` in `spawn_many`. Mutex poisoning is more of a lint than a safety requirement, as containers (such as `Slab`) and wakers have to be sound in presence of panics anyway. In this particular case, the exact behavior of `active` is not relied upon for soundness.
Closes #131 Signed-off-by: John Nunley <dev@notgull.net>
By creating the future manually instead of relying on `async { .. }`, we
workaround rustc's inefficient future layouting. On
[a simple benchmark](https://github.com/hez2010/async-runtimes-benchmarks-2024)
spawning 1M of tasks, this reduces memory use from about 512 bytes per
future to about 340 bytes per future.
More context: hez2010/async-runtimes-benchmarks-2024#1
```
warning: variables can be used directly in the `format!` string
--> examples/priority.rs:75:13
|
75 | println!("{:?}", priority);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
75 - println!("{:?}", priority);
75 + println!("{priority:?}");
|
warning: variables can be used directly in the `format!` string
--> examples/priority.rs:77:13
|
77 | println!("{:?}", priority);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
77 - println!("{:?}", priority);
77 + println!("{priority:?}");
|
warning: variables can be used directly in the `format!` string
--> benches/executor.rs:62:34
|
62 | group.bench_function(format!("{}::spawn_one", prefix), |b| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
62 - group.bench_function(format!("{}::spawn_one", prefix), |b| {
62 + group.bench_function(format!("{prefix}::spawn_one"), |b| {
|
warning: variables can be used directly in the `format!` string
--> benches/executor.rs:101:34
|
101 | group.bench_function(format!("{}::spawn_many_local", prefix), |b| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
101 - group.bench_function(format!("{}::spawn_many_local", prefix), |b| {
101 + group.bench_function(format!("{prefix}::spawn_many_local"), |b| {
|
warning: variables can be used directly in the `format!` string
--> benches/executor.rs:139:34
|
139 | group.bench_function(format!("{}::spawn_recursively", prefix), |b| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
139 - group.bench_function(format!("{}::spawn_recursively", prefix), |b| {
139 + group.bench_function(format!("{prefix}::spawn_recursively"), |b| {
|
warning: variables can be used directly in the `format!` string
--> benches/executor.rs:204:34
|
204 | group.bench_function(format!("{}::yield_now", prefix), |b| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
204 - group.bench_function(format!("{}::yield_now", prefix), |b| {
204 + group.bench_function(format!("{prefix}::yield_now"), |b| {
|
warning: variables can be used directly in the `format!` string
--> benches/executor.rs:250:34
|
250 | group.bench_function(format!("{}::channels", prefix), |b| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
250 - group.bench_function(format!("{}::channels", prefix), |b| {
250 + group.bench_function(format!("{prefix}::channels"), |b| {
|
warning: variables can be used directly in the `format!` string
--> benches/executor.rs:328:34
|
328 | group.bench_function(format!("{}::web_server", prefix), |b| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
328 - group.bench_function(format!("{}::web_server", prefix), |b| {
328 + group.bench_function(format!("{prefix}::web_server"), |b| {
|
```
```
warning: unneeded unit return type
--> src/lib.rs:1159:42
|
1159 | struct AsyncCallOnDrop<Fut, Cleanup: FnMut()> {
| ^^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
= note: `#[warn(clippy::unused_unit)]` on by default
```
Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version. - [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md) - [Commits](bheisler/criterion.rs@0.5.0...0.6.0) --- updated-dependencies: - dependency-name: criterion dependency-version: 0.6.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Taiki Endo <te316e89@gmail.com>
Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version. - [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md) - [Commits](bheisler/criterion.rs@0.6.0...0.7.0) --- updated-dependencies: - dependency-name: criterion dependency-version: 0.7.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
* Don't explicitly panic when avoidable * Update src/lib.rs Co-authored-by: Taiki Endo <te316e89@gmail.com> * Do the same for static executors --------- Co-authored-by: Taiki Endo <te316e89@gmail.com>
Use `Pin<&'a State>` to point to the state instead of cloning `Arc`s, this should reduce the amount of atomic operations required. This should be sound given that the state are never moved until the Executor is dropped. This still uses `Arc` instead of `Box` as miri will treat a former Box as a uniquely owned pointer and cannot be shared (backed by `Unique` vs `Shared`).
The doc_auto_cfg attribute has been renamed to doc_cfg rust-lang/rust#43781
Updates the requirements on [criterion](https://github.com/criterion-rs/criterion.rs) to permit the latest version. - [Release notes](https://github.com/criterion-rs/criterion.rs/releases) - [Changelog](https://github.com/criterion-rs/criterion.rs/blob/master/CHANGELOG.md) - [Commits](criterion-rs/criterion.rs@criterion-plot-v0.7.0...criterion-v0.8.0) --- updated-dependencies: - dependency-name: criterion dependency-version: 0.8.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
Update criterion requirement from 0.7 to 0.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.