I want to notify a working thread with a signal - that it should stop waiting events and check some global conditions. I use epoll_pwait
on Linux, and I want to do the same on Mac OS.
But kqueue(2)
manual says:
EVFILT_SIGNAL ... Only signals sent to the process, not to a particular thread, will trigger the filter.
How to overcome this limitation? Or may be there is another good way to notify sole thread waiting on kevent
?