pw_async_basic: Introduce ExecuteTask This change introduces the virtual function `ExecuteTask` which factors out the code to execute a task from `ExecuteDueTasks` and `DrainTasksQueue`. If a derived class overrides the `PostAt` and the `ExecuteTask` function they can acquire a resource when the task gets posted, and can release the resource when the task has finished executing. Bug: 373449543 Change-Id: Ie61948157db8db18a55318e60746fd265e18f71a Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/256838 Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Jonathon Reinhart <jrreinhart@google.com> Reviewed-by: Ewout van Bekkum <ewout@google.com> Commit-Queue: Christoph Klee <chklee@google.com> Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
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/.