Skip to content

Commit c6d688c

Browse files
committed
Wait for global start flags only if != 0
1 parent 340a244 commit c6d688c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Arduino_Threads.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ class ArduinoThreads {
4949
// if startFlags have been passed then wait until all the flags are set
5050
// before starting the loop. this is used to synchronize loops from multiple
5151
// sketches.
52-
globalEvents.wait_all(startFlags);
52+
if (startFlags != 0) {
53+
globalEvents.wait_all(startFlags);
54+
}
5355

5456
// if stopFlags have been passed stop when all the flags are set
5557
// otherwise loop forever

0 commit comments

Comments
 (0)