Skip to content

refactor: remove slab from waiter storage - #143

Merged
tisonkun merged 9 commits into
mainfrom
codex/remove-slab-waiter-lifecycle
Aug 14, 2026
Merged

refactor: remove slab from waiter storage#143
tisonkun merged 9 commits into
mainfrom
codex/remove-slab-waiter-lifecycle

Conversation

@tisonkun

@tisonkun tisonkun commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace the slab-backed waiter stores with a focused internal free-list arena
  • simplify WaitList to explicit head/tail links while retaining detached future-owned nodes until poll or drop
  • make wake-all registrations epoch-aware and unregister them when waiting futures are cancelled
  • reclaim queue-owned Semaphore::forget_exact debt nodes immediately after they are fulfilled
  • migrate FairShare to the same arena and remove mea’s only normal dependency

Waiter lifecycle

Future-owned semaphore and condition-variable waiters transition from linked to detached and are removed when their future observes completion or is dropped. Queue-owned permit debt is removed during the same operation that detaches it. WaitSet registrations carry an epoch so a stale registration cannot alias a slot reused after wake-all.

Validation

  • cargo x lint
  • cargo x test --no-capture
  • cargo x bench
  • cargo +1.85.0 test --workspace --no-default-features
  • cargo tree -p mea --edges normal

Replace slab-backed waiter state with a focused internal arena, make wait registrations generation-aware and cancellable, and reclaim queue-owned semaphore debt nodes as soon as they are fulfilled.
…ter-lifecycle

# Conflicts:
#	CHANGELOG.md
#	mea/Cargo.toml
…ter-lifecycle

# Conflicts:
#	mea/benches/primitives/semaphore.rs
@tisonkun tisonkun mentioned this pull request Aug 14, 2026
@tisonkun
tisonkun merged commit 0c8bad0 into main Aug 14, 2026
10 checks passed
@tisonkun
tisonkun deleted the codex/remove-slab-waiter-lifecycle branch August 14, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove slab Dependency Deregister cancelled broadcast recv futures from WaitSet

1 participant