poll icon indicating copy to clipboard operation
poll copied to clipboard

edge trigerred polling and mutex

Open craff opened this issue 1 year ago • 2 comments

Hello,

  • It would be nice to have an access to eventfd (or even better Mutex and Semaphore bases on event fd). Note that the logic for mutex is much simpler with edge trigerred polling, for the situation where 2 or more thread are blocked on the same mutex.

  • So it would be nice to be able to choose between edge triggered and oneshot (it is ok for me if there are only these two choices).

Note I know all this is possible on linux and BSD. I don't know for windows.

Cheers, Christophe

craff avatar Feb 14 '25 19:02 craff

Note I know all this is possible on linux and BSD. I don't know for windows.

Windows is why I didn't pick edge triggered events. This would work for both kqueue and epoll but wepoll (the windows epoll compatibility layer picked here) doesn't support edge triggered events.

anuragsoni avatar Feb 14 '25 19:02 anuragsoni

Anurag Soni @.***> writes:

anuragsoni anuragsoni left a comment (anuragsoni/poll#16)

Note I know all this is possible on linux and BSD. I don't know for windows.

Windows is why I didn't pick edge triggered events. This would work for both kqueue and epoll but wepoll (the windows epoll compatibility layer picked here) doesn't support edge triggered events.

Can'y they be simulated by rearming a one_chot event automatically when poll report an event for an ET socket ?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

-- Christophe Raffalli web: https://raffalli.eu

craff avatar Feb 14 '25 20:02 craff