Protect event handler against concurrent threads
Protect event handler against concurrent threads

Concurrent threads could change or delete event
handler while the event being processed by the
event handler was waiting in its event queue.
So now we check that the thread ID associated
with it is equal to the thread ID contained
in the event object (which is our thread's ID).

kostix/posix-signal