File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -669,7 +669,12 @@ be queued for execution. Note that the synchronous sequence
669
669
event.set()
670
670
event.clear()
671
671
```
672
- will cause any tasks waiting on the event to resume in round-robin order.
672
+ will cause any tasks waiting on the event to resume in round-robin order. In
673
+ general the waiting task should clear the event, as in the ` waiter ` example
674
+ above. This caters for the case where the waiting task has not reached the
675
+ event at the time when it is triggered. In this instance, by the time the task
676
+ reaches the event, the task will find it clear and will pause. This can lead to
677
+ non-deterministic behaviour if timing is marginal.
673
678
674
679
The ` Event ` class is an efficient and effective way to synchronise tasks, but
675
680
firmware applications often have multiple tasks running ` while True: ` loops.
You can’t perform that action at this time.
0 commit comments