Skip to content

Commit d871fd5

Browse files
committed
feat: update embassy-time dependency to include generic-queue-16 feature for FuturesUnordered compatibility
1 parent b9223e4 commit d871fd5

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

docs/aimdb-usage-guide.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ aimdb-embassy-adapter = { version = "0.3", features = ["embassy-runtime", "embas
159159

160160
# Embassy runtime (example for RP2040)
161161
embassy-executor = { version = "0.6", features = ["arch-cortex-m", "executor-thread"] }
162-
embassy-time = { version = "0.3" }
162+
embassy-time = { version = "0.3", features = ["generic-queue-16"] } # REQUIRED — see note below
163163
embassy-rp = { version = "0.2", features = ["time-driver"] }
164164

165165
# CRITICAL: Patch dependencies for compatibility
@@ -179,6 +179,18 @@ mountain-mqtt = { git = "https://github.com/aimdb-dev/mountain-mqtt.git", branch
179179
mountain-mqtt-embassy = { git = "https://github.com/aimdb-dev/mountain-mqtt.git", branch = "main" }
180180
```
181181

182+
> **Required: `embassy-time` generic timer queue.** AimDB drives every
183+
> registered future from a single Embassy task via `FuturesUnordered`, so
184+
> `embassy_time::Timer` and `Ticker` are polled with `FuturesUnordered`'s
185+
> waker rather than an Embassy-executor waker. The default
186+
> executor-integrated timer queue rejects that waker and panics with
187+
> *"Found waker not created by the Embassy executor…"* at the first timer
188+
> await. Enable one of the `generic-queue-N` features on `embassy-time` in
189+
> your binary — `generic-queue-16` is a reasonable starting point; raise it
190+
> if you have many concurrent timers in flight. This is a binary-level
191+
> choice: AimDB's own crates deliberately do **not** enable a queue size,
192+
> following [embassy-time's guidance for libraries](https://docs.embassy.dev/embassy-time/git/default/index.html#generic-queue).
193+
182194
### Basic Example (main.rs)
183195

184196
```rust

0 commit comments

Comments
 (0)