On Saturday, November 3, 2012 10:40:20 PM UTC+1, Henri Tuhola wrote: > > I want to do an event emitter that gets events from libudev. > > udev_monitor_get_fd gives me a file descriptor that I'd need to poll, and > once the descriptor wakes up I'd need to call udev_monitor_receive_device > to retrieve the event so I can emit it. > > Am I able to do this with node.js and libuv or do I need to pack that > monitor into it's own thread? >
If you're targeting node 0.8.0 or later, you can use uv_poll: https://github.com/joyent/node/blob/44dd2c392a1378c081b5b21cf5d987e7509457c9/deps/uv/include/uv.h#L943-1008 - Bert -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
