Maybe you would be interested in the proposed standalone event flags object.
It has the following differences comparing to the built-in Event Flags:
- it's a standalone object, not associated with any thread, i.e. more than one thread could wait on the same object;
- it supports atomic operation of wait & clear, i.e. it's possible to release either one or all threads from wait;
- there could be an unlimited number of such objects.
It could be used either as a replacement or alongside the built-in Event Flags.
I have attached a patch against the 18.2.x branch.
Regards,
n_o_o_n.