Split out from #18 item 3.
Problem
The Python bindings in fbuild-python expose only synchronous methods. FastLED's FbuildSerialAdapter._run_in_thread wraps every call in a thread executor so async callers don't block their event loop, but this generates an asyncio warning under some configurations and adds latency.
Proposed fix
Add AsyncSerialMonitor, AsyncDaemon, etc. that use pyo3-async-runtimes to expose async def-callable methods directly under asyncio.run(...).
- Existing sync
SerialMonitor / Daemon / DaemonConnection stay for backward compatibility.
- New async classes are purely additive.
Scope
- Add
pyo3-async-runtimes (or successor) to crates/fbuild-python/Cargo.toml.
- Wrap each long-running operation (serial read/write,
send_op) as an async method on a new class.
- Tests verify
asyncio.run(...) works and does not spin up an extra thread pool.
Non-goals
- Migrating or deprecating the sync API. Sync stays.
Context
Filed during the issue consolidation that closed tracker #18. See #18 for the original framing.
Split out from #18 item 3.
Problem
The Python bindings in
fbuild-pythonexpose only synchronous methods. FastLED'sFbuildSerialAdapter._run_in_threadwraps every call in a thread executor so async callers don't block their event loop, but this generates anasynciowarning under some configurations and adds latency.Proposed fix
Add
AsyncSerialMonitor,AsyncDaemon, etc. that usepyo3-async-runtimesto exposeasync def-callable methods directly underasyncio.run(...).SerialMonitor/Daemon/DaemonConnectionstay for backward compatibility.Scope
pyo3-async-runtimes(or successor) tocrates/fbuild-python/Cargo.toml.send_op) as an async method on a new class.asyncio.run(...)works and does not spin up an extra thread pool.Non-goals
Context
Filed during the issue consolidation that closed tracker #18. See #18 for the original framing.