Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
f25cd26
Replace vec-arena with slab
taiki-e Apr 18, 2021
50f8670
Merge pull request #23 from smol-rs/slab
taiki-e Apr 20, 2021
edf0296
Bump to v1.4.1
taiki-e Apr 24, 2021
dacd4db
Merge pull request #24 from smol-rs/next
taiki-e Apr 24, 2021
b9ac443
Update slab to 0.4.4
taiki-e Dec 30, 2021
2341801
Fix clippy::redundant_closure warning
taiki-e Dec 30, 2021
ee7bd4d
Clean up CI config
taiki-e Jan 8, 2022
367095c
Create GitHub release automatically
taiki-e Jan 8, 2022
f190408
Remove rustfmt.toml
taiki-e Jan 8, 2022
19919c4
Update actions/checkout action to v3
taiki-e May 1, 2022
21f4982
Update CI config
taiki-e Jul 7, 2022
16f0b9c
Bump MSRV to Rust 1.47
taiki-e Jul 7, 2022
d1e4817
Run Miri on CI (#27)
taiki-e Jul 7, 2022
660747c
Apply clippy to tests and examples
taiki-e Jul 17, 2022
d2daab5
Enable -Zmiri-strict-provenance
taiki-e Aug 16, 2022
263ea89
Replace once_cell with async-lock (#29)
notgull Oct 30, 2022
92423cf
Remove msrv field from .clippy.toml
taiki-e Nov 9, 2022
c09ecba
Update concurrent-queue to 2
taiki-e Nov 9, 2022
00ea6cf
Release 1.5.0
taiki-e Nov 9, 2022
8287e52
Implement debug output to be better (#33)
notgull Dec 25, 2022
b48a503
Clean up CI config
taiki-e Dec 28, 2022
f196463
Enable dependabot update for Rust
taiki-e Dec 28, 2022
a988ee3
m: Migrate benchmarks to criterion (#35)
notgull Jan 23, 2023
4d8e7ba
Set CARGO_NET_GIT_FETCH_WITH_CLI=true in CI
taiki-e Jan 21, 2023
ddfb54d
Minimize GITHUB_TOKEN permissions
taiki-e Jan 21, 2023
b8885f9
Bump MSRV to 1.48
taiki-e Mar 5, 2023
6aba704
bench: Add benchmarks for lower thread counts (#38)
notgull Mar 11, 2023
a438e9d
v1.5.1 (#40)
notgull Apr 7, 2023
8562c41
Update permissions for security_audit
taiki-e Apr 9, 2023
85c20eb
Replace `num_cpus` crate with `std::thread` (#42)
yoshuawuyts May 5, 2023
1a9e08c
Use fastrand v2.0.0 (#45)
notgull Jun 10, 2023
9df3dd4
alg: Push tasks directly to the local runner
notgull Jul 2, 2023
aed7279
Add smol-rs logo (#46)
notgull Jul 17, 2023
e195733
v1.5.2
notgull Aug 20, 2023
a5ff8df
bugfix: Ensure that ex.run() produces a Send future
notgull Aug 21, 2023
609aafb
Bump MSRV to 1.61
taiki-e Sep 4, 2023
ff67cb9
Update actions/checkout action to v4
taiki-e Sep 10, 2023
ecddfde
m: Remove unused memchr dependency
notgull Sep 23, 2023
77b5b16
v1.5.3
notgull Sep 25, 2023
4154ad2
Fix a bug where TLS would become None (#55)
notgull Sep 28, 2023
2cfb6e4
v1.5.4
notgull Sep 28, 2023
917caad
ex: Add an example of an executor with limited tasks
notgull Oct 16, 2023
8a0832c
m: Remove the thread-local executor optimization
notgull Oct 17, 2023
599c71a
v1.6.0
notgull Oct 17, 2023
b91875e
deps: Update async-channel requirement from 1.4.1 to 2.0.0
dependabot[bot] Oct 31, 2023
e1e2ab1
Bump async-io, async-lock and futures-lite
notgull Nov 2, 2023
457cf7b
Disable leaky test for MIRI
notgull Nov 2, 2023
361c5fd
Fix missing import on Miri
notgull Nov 3, 2023
c7fd967
v1.7.0
notgull Nov 6, 2023
f076528
Add a disclaimer saying this is a basic executor (#74)
notgull Nov 11, 2023
6c3d45b
bugfix: Fix wasm32 compile errors
notgull Nov 11, 2023
1d4769a
v1.7.1
notgull Nov 13, 2023
b140c46
Fix dev-dependency WASM compilation issue
notgull Nov 13, 2023
144b057
Update to 2021 edition
notgull Nov 13, 2023
4b1cf40
v1.7.2
notgull Nov 18, 2023
fa117de
Propagate panics in tasks (#78)
notgull Nov 21, 2023
d747bcd
v1.8.0
notgull Nov 24, 2023
24510a7
ci: Use cargo-hack's --rust-version flag for msrv check
taiki-e Jan 6, 2024
57fcc2d
Relax MSRV to 1.60
taiki-e Jan 6, 2024
6c70369
ex: Use Semaphore instead of manual event-listener
notgull Jan 9, 2024
4fbe23a
Update criterion requirement from 0.4 to 0.5 (#43)
dependabot[bot] Jan 26, 2024
0baba46
chore: Bump async-task to v4.4.0
jbr Feb 13, 2024
7ffdf5b
m: Replace unnecessary atomics with non-atomic operations
james7132 Feb 17, 2024
568a314
Avoid redundant lookups in the active slab when spawning new tasks (#96)
james7132 Feb 17, 2024
188f976
m: Weaken the atomic orderings for notification
james7132 Feb 17, 2024
7592d41
feat: Use actual thread local queues instead of using a RwLock
james7132 Feb 22, 2024
c7bbe48
Use wrapping add on ticks to avoid tick counter overflow in debug bui…
james7132 Feb 22, 2024
2f3189a
v1.9.0
notgull Feb 22, 2024
d5dc7a8
tests: Add tests with more complicated futures
notgull Feb 24, 2024
22a9e8b
bugfix: Account for local queue corner cases
notgull Mar 2, 2024
c90fd30
Revert "bugfix: Account for local queue corner cases"
notgull Mar 23, 2024
00dbbbf
Revert "feat: Use actual thread local queues instead of using a RwLock"
notgull Mar 23, 2024
a2c1267
chore: Fix new nightly warnings
notgull Mar 23, 2024
b6d3a60
chore: Fix MIRI failure in larger_tasks
notgull Mar 23, 2024
17720b0
v1.9.1
notgull Mar 30, 2024
d319699
feat: Add a way to batch spawn tasks
notgull Feb 13, 2024
00f0b99
chore: Silence clippy
notgull Apr 5, 2024
4b37c61
v1.10.0
notgull Apr 7, 2024
649bdfd
Support racy initialization of an Executor's state
james7132 Apr 9, 2024
df57d9b
feat: reexport async_task::FallibleTask
jbr Apr 11, 2024
ef512cb
v1.11.0
notgull Apr 14, 2024
f1c7ae3
bench: Add some more filled-out benchmarks
notgull Apr 26, 2024
924b453
feat: Implement static executors
james7132 May 12, 2024
7577d56
v1.12.0
notgull May 25, 2024
054c9d1
feat: relax Send bound on LocalExecutor::spawn_many
zetanumbers Jun 9, 2024
1dd477b
Fix rustdoc warnings for static executors
alyssais Jul 6, 2024
0fc974e
Configure docs.rs to document all features
alyssais Jul 6, 2024
675be0f
Show static feature requirement on docs.rs
alyssais Jul 6, 2024
21d436d
v0.13.0
Jul 15, 2024
57ffea0
chore: fix clippy complains ident
linyihai Aug 15, 2024
e399c25
Fix doc build (#125)
linyihai Aug 23, 2024
62a83b1
v1.13.1
notgull Sep 6, 2024
fc33b2b
Fix build badge
lewiszlw Sep 18, 2024
0a20bc8
Merge pull request #128 from lewiszlw/patch-1
zeenix Sep 18, 2024
9335b7e
ci: Use "v2.0.0" branch for security check
notgull Oct 18, 2024
0c216e8
Ignore poisoning of `active`
purplesyringa Nov 30, 2024
76bea84
deps: Bump slab to v0.4.7
notgull Oct 6, 2024
47739f1
Reduce memory footprint
purplesyringa Nov 30, 2024
60a2185
ci: Use reusable workflows for fmt and security_audit
taiki-e Jan 19, 2025
3d912bb
Release 1.13.2
taiki-e Apr 28, 2025
87a287a
Fix clippy::uninlined_format_args warning
taiki-e Jul 6, 2025
b3269e1
Ignore clippy::unused_unit lint
taiki-e Jul 6, 2025
95ec34d
Update criterion requirement from 0.5 to 0.6 (#142)
dependabot[bot] Jul 26, 2025
58411d6
Update criterion requirement from 0.6 to 0.7
dependabot[bot] Aug 5, 2025
08c3fc4
Don't explicitly panic or block when avoidable (#147)
james7132 Aug 24, 2025
1e8d245
v1.13.3
notgull Aug 24, 2025
c10412c
Pin an Executor's State to minimize atomic operations. (#146)
james7132 Aug 27, 2025
b0f396c
Fix failing docs build (#152)
wojciech-graj Oct 29, 2025
86bcbf8
Update criterion requirement from 0.7 to 0.8
dependabot[bot] Dec 2, 2025
47d7f7a
Merge pull request #154 from smol-rs/dependabot/cargo/criterion-0.8
zeenix Dec 2, 2025
cc6941a
refactor: return `Self`
mkroening Jul 25, 2025
150ca22
refactor: import items from core and alloc if possible
mkroening Jul 24, 2025
0712357
chore: add `use Box` (for no-std compatibility)
fogti Jan 21, 2026
543403e
Release 1.14.0
taiki-e Jan 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
commit-message:
prefix: ''
labels: []
43 changes: 0 additions & 43 deletions .github/workflows/build-and-test.yaml

This file was deleted.

91 changes: 91 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: CI

permissions:
contents: read

on:
pull_request:
push:
branches:
- master
schedule:
- cron: '0 2 * * 0'

env:
CARGO_INCREMENTAL: 0
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10

defaults:
run:
shell: bash

jobs:
fmt:
uses: smol-rs/.github/.github/workflows/fmt.yml@main
security_audit:
uses: smol-rs/.github/.github/workflows/security_audit.yml@main
permissions:
checks: write
contents: read
issues: write
secrets: inherit

test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
rust: [nightly, beta, stable]
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- run: rustup target add wasm32-unknown-unknown
- uses: taiki-e/install-action@cargo-hack
- run: cargo build --all --all-features --all-targets
if: startsWith(matrix.rust, 'nightly')
- name: Run cargo check (without dev-dependencies to catch missing feature flags)
if: startsWith(matrix.rust, 'nightly')
run: cargo check -Z features=dev_dep
- run: cargo test
- run: cargo test --all-features
- run: cargo check --all --all-features --target wasm32-unknown-unknown
- run: cargo hack build --all --all-features --target wasm32-unknown-unknown --no-dev-deps

msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- run: cargo hack build --rust-version

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- run: cargo clippy --all-features --all-targets

miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup toolchain install nightly --component miri && rustup default nightly
- run: cargo miri test
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation
RUSTFLAGS: ${{ env.RUSTFLAGS }} -Z randomize-layout
- run: cargo miri test --all-features
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation -Zmiri-ignore-leaks
RUSTFLAGS: ${{ env.RUSTFLAGS }} -Z randomize-layout
23 changes: 0 additions & 23 deletions .github/workflows/lint.yaml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release

permissions:
contents: write

on:
push:
tags:
- v[0-9]+.*

jobs:
create-release:
if: github.repository_owner == 'smol-rs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: CHANGELOG.md
branch: master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 0 additions & 17 deletions .github/workflows/security.yaml

This file was deleted.

103 changes: 103 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,106 @@
# Version 1.14.0

- Bump MSRV to 1.65. (#146)
- Fix docs.rs build. (#152)
- Upstreaming parts of the Hermit `no_std` patchset:
- Use `Self` where possible (#155)
- Import items from `core` and `alloc` if possible (#160)

# Version 1.13.3

- Avoid places where the code had a possibility to block or panic. (#147)

# Version 1.13.2

- Fix build failure with minimal-versions. (#132)
- Prevent executor from becoming unusable by panic of the iterator passed by the user to the `spawn_many`. (#136)
- Reduce memory footprint. (#137)

# Version 1.13.1

- Fix docs.rs build. (#125)

# Version 1.13.0

- Relax the `Send` bound on `LocalExecutor::spawn_many`. (#120)
- Ensure all features are documented on `docs.rs`. (#122)

# Version 1.12.0

- Add static executors, which are an optimization over executors that are kept
around forever. (#112)

# Version 1.11.0

- Re-export the `async_task::FallibleTask` primitive. (#113)
- Support racy initialization of the executor state. This should allow the executor to be
initialized on web targets without any issues. (#108)

# Version 1.10.0

- Add a function `spawn_batch` that allows users to spawn multiple tasks while only locking the executor once. (#92)

# Version 1.9.1

- Remove the thread-local optimization due to the bugs that it introduces. (#106)

# Version 1.9.0

- Re-introduce the thread-local task push optimization to the executor. (#93)
- Bump `async-task` to v4.4.0. (#90)
- Replace some unnecessary atomic operations with non-atomic operations. (#94)
- Use weaker atomic orderings for notifications. (#95)
- When spawning a future, avoid looking up the ID to assign to that future twice. (#96)

# Version 1.8.0

- When spawned tasks panic, the panic is caught and then surfaced in the spawned
`Task`. Previously, the panic would be surfaced in `tick()` or `run()`. (#78)

# Version 1.7.2

- Fix compilation under WebAssembly targets (#77).

# Version 1.7.1

- Fix compilation under WebAssembly targets (#75).
- Add a disclaimer indicating that this is a reference executor (#74).

# Version 1.7.0

- Bump `async-lock` and `futures-lite` to their latest versions. (#70)

# Version 1.6.0

- Remove the thread-local queue optimization, as it caused a number of bugs in production use cases. (#61)

# Version 1.5.4

- Fix a panic that could happen when two concurrent `run()` calls are made and the thread local task slot is left as `None`. (#55)

# Version 1.5.3

- Fix an accidental breaking change in v1.5.2, where `ex.run()` was no longer `Send`. (#50)
- Remove the unused `memchr` dependency. (#51)

# Version 1.5.2

- Add thread-local task queue optimizations, allowing new tasks to avoid using the global queue. (#37)
- Update `fastrand` to v2. (#45)

# Version 1.5.1

- Implement a better form of debug output for Executor and LocalExecutor. (#33)

# Version 1.5.0

- Remove the dependency on the `once_cell` crate to restore the MSRV. (#29)
- Update `concurrent-queue` to v2.

# Version 1.4.1

- Remove dependency on deprecated `vec-arena`. (#23)

# Version 1.4.0

- Add `Executor::is_empty()` and `LocalExecutor::is_empty()`.
Expand Down
50 changes: 36 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,48 @@
[package]
name = "async-executor"
version = "1.4.0"
authors = ["Stjepan Glavina <stjepang@gmail.com>"]
edition = "2018"
# When publishing a new version:
# - Update CHANGELOG.md
# - Create "v1.x.y" git tag
version = "1.14.0"
authors = ["Stjepan Glavina <stjepang@gmail.com>", "John Nunley <dev@notgull.net>"]
edition = "2021"
rust-version = "1.65"
description = "Async executor"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/smol-rs/async-executor"
homepage = "https://github.com/smol-rs/async-executor"
documentation = "https://docs.rs/async-executor"
keywords = ["asynchronous", "executor", "single", "multi", "spawn"]
categories = ["asynchronous", "concurrency"]
exclude = ["/.*"]

[features]
# Adds support for executors optimized for use in static variables.
static = []

[dependencies]
async-task = "4.0.0"
concurrent-queue = "1.2.2"
fastrand = "1.3.4"
futures-lite = "1.11.0"
once_cell = "1.4.1"
vec-arena = "1.0.0"
async-task = "4.4.0"
concurrent-queue = "2.5.0"
fastrand = "2.0.0"
futures-lite = { version = "2.0.0", default-features = false }
pin-project-lite = "0.2"
slab = "0.4.7"

[target.'cfg(target_family = "wasm")'.dependencies]
futures-lite = { version = "2.0.0", default-features = false, features = ["std"] }

[dev-dependencies]
async-channel = "1.4.1"
async-io = "1.1.9"
async-channel = "2.0.0"
async-io = "2.1.0"
async-lock = "3.0.0"
criterion = { version = "0.8", default-features = false, features = ["cargo_bench_support"] }
easy-parallel = "3.1.0"
num_cpus = "1.13.0"
fastrand = "2.0.0"
futures-lite = "2.0.0"
once_cell = "1.16.0"

[[bench]]
name = "executor"
harness = false
required-features = ["static"]

[package.metadata.docs.rs]
all-features = true
Loading