commit | 73eeb7710e9ecfd1eb9b40c7e000f78ffb1b975c | [log] [tgz] |
---|---|---|
author | Dennis Kormalev <denk@google.com> | Wed Aug 17 19:10:23 2022 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Aug 17 19:10:23 2022 +0000 |
tree | 1b4d7a59ca95205a437ea18a5d05d249ab0c8e3f | |
parent | 475ac5a3496b5e434ab95f806e1505bc82d36143 [diff] |
pw_thread: Add FunctionalThread With new changes in pw::Function which allowed for dynamic allocation it can be very convenient to create threads with lambdas with capture lists. Right now, though, it can be done only through the custom ThreadCore instance. This CL adds Thread wrapper that does exactly the same - it stores the ThreadCore instance that runs the pw::Function passed to it. Change-Id: I3f0467e39ba1ac2524606b89cda451fa823a8a27 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/106913 Reviewed-by: Wyatt Hepler <hepler@google.com> Reviewed-by: Ted Pudlik <tpudlik@google.com> Pigweed-Auto-Submit: Dennis Kormalev <denk@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.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/.