RIOT
RIOT copied to clipboard
sys/event: add event_sync()
Contribution description
In some cases it's useful to ensure forward progress in the event queue before continuing. This PR adds event_sync(), which blocks until the last event on the queue at the moment of calling this (if any) will have been processed, e.g.
event_post(queue, my_event);
// When event_sync() returns, my_event will have been processed.
event_sync();
Testing procedure
The unit test was updated accordingly.
Murdock results
:heavy_check_mark: PASSED
9996909b653ddc6f497a5b5950af75b99f4e63fa sys/event: add event_sync()
| Success | Failures | Total | Runtime |
|---|---|---|---|
| 10212 | 0 | 10214 | 18m:02s |
Artifacts
Simple but useful. I like. :+1: