pw_async2: Add FutureOrValue FutureOrValue simplifies creating manual state machines where you need to hold onto the result of a future across later suspension points after it resolves before consuming it. Currently, you'd have to write a lot of boilerplate and an explosion of class members. FutureOrValue stores either an active future or its result as a variant, providing convenient APIs for construction, polling, and value access. Change-Id: I5a94c8d4c1b5602678b3595fefbe40f4f4d84856 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/404773
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.