eventfd lookalike in FreeBSD ?

Adrian Chadd adrian.chadd at gmail.com
Tue Jul 28 17:33:19 UTC 2015


On 28 July 2015 at 10:31, David Chisnall <theraven at freebsd.org> wrote:
> On 28 Jul 2015, at 18:23, Adrian Chadd <adrian.chadd at gmail.com> wrote:
>>
>> (What would be nice is having kqueue know about conditionals, so we
>> can sleep on a cond as well as a kqueue fd+queue, but I can't have
>> everything I want..)
>
> I recently came across a need to do something like this.  Being able to add condvar / mutex pairs to a kqueue and wait on a set of condition variables, reacquiring the mutexes for any of the signalled ones, as well as waiting for kernel events would be very useful.

Windows has had this for years. It makes async network programming
with thread worker queues significantly less abusive.


-adrian


More information about the freebsd-current mailing list