Nevertheless, after more careful reviewing in your patch, it looks like
handles are never really exposed to the application, is that correct?
correct
I'm not really sure why you need a separate thread then. Why does event_set for
example not wake up the the pending waits directly? You have to be careful when locking multiple critical sections, but I do not see any reason why it shouldn't be possible.
i'll send one without