Repository navigation
Closed
1 / 61 of 6 issues completedClosed
1 / 61 of 6 issues completed
Copy link
Description
This issue organized the 0.8.x non-breaking substrate, channel parity, and performance waves across Asyncband (#446 through #455). Remaining standalone initiatives and pre-1.0 breaking items are tracked in their dedicated issues below.
Guiding constraints
- Mechanism over policy (feat: add initial support for explicitly driven timers #137, refactor: remove admission primitives #166, design(scope): define boundaries for pools, future concurrency, and schedulers #176, Explore a borrower-aware capacity limiter #224): Primitives coordinate tasks deterministically without owning timers, executors, retry/backoff policies, or task-identity fairness models.
- Zero mandatory runtime dependencies: Keep core primitives on
std(withhashbrownopt-in only for keyed tables) and preserveUnpin,mem::forget-safe waiter storage without intrusive stack-pinned UB hazards. - Unlocked waker and payload operations: Reuse wakers via
will_wakeunder short critical sections and wake or drop wakers and evicted payloads outside internal locks.
Completed 0.8.x waves
Wave 1: Substrate correctness, fast-path decoupling, and surface parity
-
OnceandOnceCellbroadcast completion state (Reduce the cost of initializing a fresh OnceCell #398, fix(once): broadcast completion across Once and OnceCell and add OnceCell::wait #446): Replace fixed-permitSemaphoreserialization inOnceandOnceCell(and transitivelyOnceMapandsingleflight::Group) with an atomic state word plus separated candidate handoff and completion broadcast, and exposeOnceCell::wait(&self) -> &T. -
LazyCelluncontended initialization and broadcast completion (Reduce the cost of forcing a fresh LazyCell #399, perf(lazy-cell): avoid locking on uncontended initialization #414, perf(lazy-cell): drive initialization and broadcast completion via OnceState #447): AlignLazyCellwith direct atomic state transitions and parallel follower wakeups rather than serializing waiting observers through a permit queue. -
RwLockandUpgradableRwLockuncontended release fast paths (Reduce the cost of upgrading a held UpgradableRwLock read guard #404, perf(rwlock): avoid wait-queue locking on uncontended write and reservation releases #448): Outline contendedinternal::semaphore::Semaphorepaths and keep a spare permit acrossRwLock(for reader limits up tousize::MAX >> 1) andUpgradableRwLockreservations so uncontended write-unlocks, downgrades, and upgrades skip the wait-queue mutex while shrinkingRwLockwrite guards by one word. - Post-completion future contracts and core inspection ergonomics (Review what hand-written futures do when polled after completion #408, feat: add Completion inspection and MutexGuard accessors and clarify future contracts #449): Clarify post-completion polling contracts across public hand-written futures (
waitgroup::Wait,shutdown::Shutdown, andoneshot::Recv), addCompletion::getandCompleter::is_disconnected, and exposeMutexGuard::mutex/OwnedMutexGuard::mutex.
Wave 2: Two-phase reservation, atomic metadata, keyed collection efficiency, and test hygiene
- Two-phase channel reservation and
spmc/broadcastendpoint parity (feat(spmc): add endpoint state queries, bounded reservation, and trait assertions #450, feat(broadcast): add MPMC receiver state queries, bounded reservation, and trait assertions #452): Fillspmcis_disconnected/is_empty,BoundedSender::{reserve, try_reserve}(spmc::Permit), and trait coverage (feat(spmc): add endpoint state queries, bounded reservation, and trait assertions #450); fillbroadcast::mpmcreceiveris_disconnected/is_empty, addreserve/try_reserve(broadcast::mpmc::Permit) tobroadcast::mpmc::boundedwithout pre-assigning broadcast sequence numbers, and extendbroadcast::mpmctrait coverage (feat(broadcast): add MPMC receiver state queries, bounded reservation, and trait assertions #452). -
watchlock-free metadata (perf(watch): move channel metadata to lock-free atomics #451): Movewatchversion, terminal disconnection state, and sender/receiver counts to atomics and separate waiter registration while preservingT: Sendcross-thread compatibility for0.8.x. -
OnceMap::from_iterunlocked build and in-place duplicate reuse (refactor(once_map): build the table before locking it and simplify lookups #355, perf(once-map): build FromIterator unlocked and reuse duplicate-key entries #453): Populate the backingHashTablebefore wrapping it inMutexand update duplicate keys in place viafind_mutandArc::get_mutwithout extra allocations while preserving fix: reclaim entries when duplicate key destructors panic #409's duplicate-key destructor panic cleanup and refactor: replace fixed coordination shards #239's lazy single-registry design. - Integration test helper consolidation (test: replace tokio-test with local polling helpers #455): Replace remaining
tokio-testusage with local deterministic polling helpers and droptokio-test/tokio-streamfrom workspace dependencies.
Standalone follow-up issues
- Pre-1.0 breaking changes: Tighten watch::{Sender, Receiver} cross-thread bounds to T: Send + Sync before 1.0 #456 (
watch::{Sender, Receiver}T: Send + Syncbounds and concurrent read snapshots). - Channel contention and throughput: Improve bounded MPSC throughput for inline 1 KiB messages #401 (
mpsc::bounded1 KiB inline transfers), Explore MPMC queue contention, wakeup, and storage optimizations #298 (mpmcqueue contention), and Reduce unbounded MPMC broadcast publish and receive overhead #402 (broadcast::mpmcreader contention). - Channel topologies: feat(broadcast): add an SPMC specialization #214 (
broadcast::spmc) and design(spsc): decide whether to expose a dedicated queue #210 (spscdesign decision). - Cooperative cancellation and task coordination: Define cooperative cancellation and its relation to shutdown #223 (
cancellation) and Explore a higher-level task group primitive #272 (TaskGroup).
Explicit non-goals
| Category | Rationale |
|---|---|
| Rate limiters and timers | Require monotonic clocks and sleep drivers owned by runtimes or dedicated crates (#137). |
| Retry, backoff, and circuit breakers | Encode application-specific error and timing policy rather than reusable synchronization (#176). |
| Borrower-aware / weighted quota pools | Require cross-task identity tracking or scheduling policy outside Rust's Future model (#166, #224). |
| Task executors and actor frameworks | Cross the boundary between runtime-agnostic synchronization building blocks and application runtimes. |
Sub-issues
Collapse Sub-issuesSub-issues
Loading 6 sub-issues
Metadata
Metadata
Assignees
Labels
No labels
Activity
tisonkun commentedon Nov 22, 2026
All
0.8.xsubstrate, parity, and hygiene slices tracked here have landed (#446–#455). Pre-1.0watchT: Send + Syncalignment is tracked in #456, and remaining channel throughput (#401, #298, #402), topology (#214, #210), and cancellation/coordination (#223, #272) work continues on those standalone issues.