Hasty Briefsbeta

Informed poll

4 hours ago
  • #embedded-systems
  • #asynchronous-programming
  • #pw_async2
  • Informed poll is the core design philosophy behind pw_async2, offering an efficient alternative to callback-based async programming.
  • Tasks represent asynchronous work, with a Dispatcher polling them to check for progress readiness.
  • Tasks communicate their state via Pend() method returns: Ready() if finished, Pending() if waiting.
  • Wakers enable 'informed' polling by notifying the Dispatcher when a task is ready to proceed.
  • pw_async2 is designed for embedded systems, emphasizing efficiency and no dynamic memory allocation.
  • The model is similar to Rust's Future trait but lacks formal semantics, with plans to narrow this gap.