Skip to content

Conversation

@bugadani
Copy link
Contributor

This PR is a backwards-compatible implementation that allows HAL implementers to mix queue implementations, which allows users to mix executors. This is mainly targeted at RTOS implementations which can use embassy-executor, and also provide their own block_on implementations simultaneously.

@bugadani bugadani force-pushed the fallible-from-waker branch 4 times, most recently from cf7e84f to 96bff4b Compare November 23, 2025 17:02
@bugadani bugadani force-pushed the fallible-from-waker branch from 7f813ff to 617ae47 Compare January 1, 2026 19:29
Copilot AI review requested due to automatic review settings January 1, 2026 19:29
@bugadani bugadani changed the title Add fallible from_waker getter, expose timer queue impls unconditionally Expose timer queue impls unconditionally, support timer queue items stored outside of tasks (e.g. RTOS-aware block_on) Jan 1, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables mixing of timer queue implementations in embassy-time-queue-utils, allowing HAL implementers to support both embassy-executor and custom RTOS block_on implementations simultaneously. The changes expose both integrated and generic queue implementations unconditionally while maintaining backward compatibility through a feature-gated default.

  • Extracted schedule_wake_queue_item method from schedule_wake to support external timer queue item storage
  • Made both queue implementations (queue_generic and queue_integrated) publicly available regardless of feature flags
  • Introduced a wrapper Queue struct that delegates to the appropriate implementation based on feature configuration

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
embassy-time-queue-utils/src/queue_integrated.rs Refactored schedule_wake to delegate to new schedule_wake_queue_item method, enabling queue item storage outside of executor tasks
embassy-time-queue-utils/src/lib.rs Removed feature-gating on queue module exports, added wrapper Queue struct that provides a unified interface while delegating to the feature-selected implementation
embassy-time-queue-utils/CHANGELOG.md Documented the new public API changes and added entry for schedule_wake_queue_item method

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bugadani bugadani force-pushed the fallible-from-waker branch from 617ae47 to 0013198 Compare January 1, 2026 19:37
Copy link
Member

@lulf lulf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objection from me :)

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.

2 participants