Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static Executors #112

Merged
merged 32 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d260c2d
Base implementation
james7132 Apr 10, 2024
99c737d
Add benchmarks
james7132 Apr 10, 2024
dd81438
Cleanup lifetimes and safety comments
james7132 Apr 10, 2024
b60069a
Cleanup docs
james7132 Apr 11, 2024
8f03deb
Extend CI to check all features
james7132 Apr 11, 2024
900a95e
Reorder safety comments
james7132 Apr 11, 2024
22ffdce
Formatting
james7132 Apr 11, 2024
1c1493d
Allow leaks only when testing the leak feature
james7132 Apr 11, 2024
f5f0871
Use the right flags
james7132 Apr 11, 2024
4ed3f94
Apply suggestions from code review
james7132 Apr 12, 2024
354223c
Move common function impls onto State
james7132 Apr 12, 2024
8c656f5
Move LeakedExecutor to another file
james7132 Apr 12, 2024
fb494f3
Backlink to Executor::leak
james7132 Apr 12, 2024
5aa751c
Ensure all active tasks are rescheduled when leaking.
james7132 Apr 12, 2024
48134c7
Add example for Executor::leak
james7132 Apr 12, 2024
04cc8e5
Merge branch 'master' into leaked-executor
james7132 Apr 12, 2024
0f975a4
Test without all features
james7132 Apr 13, 2024
75ad689
Add a StaticLocalExecutor
james7132 Apr 13, 2024
db9afd7
Use doc_auto_cfg on docs.rs builds
james7132 Apr 13, 2024
281b601
Fix benchmarks and formatting
james7132 Apr 13, 2024
0fc9770
Fix StaticLocalExecutor doc tests
james7132 Apr 13, 2024
c4b59c5
Make the doc_auto_cfg a crate-level attribute.
james7132 Apr 14, 2024
050d54e
Merge branch 'master' into leaked-executor
james7132 Apr 14, 2024
6e2bc3b
Use const construction to allow direct initialization in static varia…
james7132 Apr 14, 2024
eb7935d
Change name of modules away from leaking
james7132 Apr 14, 2024
99abde6
Bump MSRV to 1.63
james7132 Apr 14, 2024
d3199af
Fix features
james7132 Apr 16, 2024
f9e991c
Address benches comment
james7132 Apr 16, 2024
17dde24
Actually fix the benchmarks
james7132 Apr 16, 2024
890b823
Relax the lifetime constraints on T for spawn_scoped
james7132 Apr 16, 2024
47007be
Update to published concurrent-queue.
james7132 May 9, 2024
e53eb58
Merge branch 'master' into leaked-executor
james7132 May 12, 2024
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
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
if: startsWith(matrix.rust, 'nightly')
run: cargo check -Z features=dev_dep
- run: cargo test
- run: cargo test --all-features
james7132 marked this conversation as resolved.
Show resolved Hide resolved
- run: cargo check --all --all-features --target wasm32-unknown-unknown
- run: cargo hack build --all --all-features --target wasm32-unknown-unknown --no-dev-deps

Expand Down Expand Up @@ -82,6 +83,10 @@ jobs:
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

security_audit:
permissions:
Expand Down
9 changes: 7 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ name = "async-executor"
version = "1.11.0"
authors = ["Stjepan Glavina <[email protected]>", "John Nunley <[email protected]>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.63"
description = "Async executor"
license = "Apache-2.0 OR MIT"
repository = "https:/smol-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.4.0"
concurrent-queue = "2.0.0"
concurrent-queue = "2.5.0"
fastrand = "2.0.0"
futures-lite = { version = "2.0.0", default-features = false }
slab = "0.4.4"
Expand All @@ -37,3 +41,4 @@ once_cell = "1.16.0"
[[bench]]
name = "executor"
harness = false
required-features = ["static"]
Loading
Loading