TcMenu / TaskManagerIO

A task, event, scheduling, and interrupt marshalling library for Arduino and mbed boards.
Apache License 2.0
125 stars 14 forks source link

Events did not write to the running flag meaning in edge cases could run twice #41

Closed davetcc closed 2 years ago

davetcc commented 2 years ago

We've strengthened up the checks around the running flag, and also improved the behavior of the currently running task pointer as well.

It was possible if yieldForMicros was used in an event that it could run again within the yieldForMicros function if an interrupt was triggered. This is not standard behavior and the new behavior prevents this, just leaving the event to be triggered again later.

davetcc commented 2 years ago

As this is a critical bug, it will be released as soon as I've tested it on a few boards.