Skip to content

feat(async): deadline waits, periodic ticks and immediate permit acquisition #172

Closed

Description

@zackees

Coordinated with FastLED/cli#239. FastLED still directly uses Tokio absolute timer waits, a 100ms periodic viewer-liveness tick, and non-waiting semaphore acquisition for its bounded test-sleep endpoint.

Add concrete facade operations to existing async_engine: sleep_until(Deadline), an owned periodic timer with explicit immediate-first-tick / burst catch-up semantics preserving existing client behavior, and Semaphore::try_acquire returning an owned permit or None without waiting. Reject a zero timer period explicitly. Preserve cancellation safety: dropping a pending tick must not consume a tick, and dropping a permit restores shared capacity. No new runtime, background thread, queue or dependency is required. Keep timer/permit backend types private.

Generic RED-to-GREEN tests belong upstream, including deadline sharing, periodic timing/cancellation/catch-up, zero-period rejection, cloned permit pools and permit release. App retains timeout durations, interval choice, 4-request concurrency limit and HTTP 429 policy. Exact-release adoption follows upstream merge/release.

Activity

  1. zackees commented on Sep 16, 2026

    @zackees
    CollaboratorAuthor

    Complete and adopted; closing with the evidence rather than leaving it open.

    kernal-api — landed in d738d42, with tests/async_timers_permits.rs. Verified present on main rather than inferred from the commit message alone.

    FastLED — the kernel async surface the application builds on.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions