RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

sys/event: add event_sync()

Open derMihai opened this issue 1 year ago • 2 comments

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.

derMihai avatar Oct 17 '24 09:10 derMihai

Murdock results

:heavy_check_mark: PASSED

9996909b653ddc6f497a5b5950af75b99f4e63fa sys/event: add event_sync()

Success Failures Total Runtime
10212 0 10214 18m:02s

Artifacts

riot-ci avatar Oct 17 '24 16:10 riot-ci

Simple but useful. I like. :+1:

kaspar030 avatar Oct 18 '24 11:10 kaspar030