|
From: Lucio A. I. A. <l.i...@gm...> - 2016-11-28 01:12:28
|
On 27.11.2016 23:48, Jeff Rogers wrote: > pthread_kill sounds troubling .. synchronization issues, cancellation points, bla. > > Can't you use the same model of using a trigger pipe to do the inter-thread notification, but with each thread having its own trigger pipe? That is, when the trigger pipe is written to, the select/poll/epoll/kqueue wakes up, and can then check the condition variable. As was suggested earlier, it means an extra 2 fds per thread, but that's much less of an issue since you're not limited to 1024 fds. Great idea! Pushed to master. |