Hi! On 01/07/16 20:02, [email protected] wrote: > My application currently uses poll() to detect changes to a device > driver attribute in /sys. However, I have not been able to implement > this functionality with libuv. The kernel posts the POLLPRI event when > the attribute changes, but uv_poll_t does not seem to handle it. Is this > functionality achievable with libuv or planned for a future release? > > Currently, I work around this by spawning a new thread that runs its own > poll() loop and signals a uv_async_t when a POLLPRI event is received. > My main loop registers a callback on this async handle. I'd like to > accomplish the same goal (callback on main loop when attribute changes) > without explicitly creating a thread. > > I found this thread on StackOverflow > <https://stackoverflow.com/questions/27259962/how-does-one-use-libuv-and-pollpri-together> > but > the linked patch does not seem to have been integrated into libuv. >
Heh, I wrote that, though it's not complete... The idea is simple (I think): we also register for EPOLLPRI and when it comes back, we coalesce it with EPOLLIN (this last part was missing). If you want to give it a go feel free to open a pull request when you have something and I can help reviewing. Cheers, -- Saúl Ibarra Corretgé bettercallsaghul.com -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/libuv. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: OpenPGP digital signature
