Closed CAHEK7 closed 8 years ago
Nice work! Thanks for contributing. One additional thing I would love, is to have an example of use of a StaticThreadController. Can you thing in something easy, that "improves" and shows a use case for it?
Thanks
Thanks for feedback, seems like I should revise my initial idea and do some adjustments in the code. As about improvements - Static version is a bit more efficient since it doesn't contain "empty" entries and shouldn't iterate over them. Also it doesn't have any size limitations except available memory. As about use case - everywhere if you don't need dynamically add or remove threads.
Static version is more efficient even if it holds 15 threads, because it "adds" threads to the array at compile time. It may save about 200-300 byte of memory. Just replaced Threads with Thread* and did the measurements.
Thank you very much @CAHEK7! Just published the version. https://github.com/ivanseidel/ArduinoThread/releases/tag/2.1.0
Bumped from 2.0.3 to 2.1.0 as it includes new features.
This is suggested solution for #6.