I'd like to know if there are dangers with spawning multiple threads that each create their own udev context and start monitoring hardware changes. It would think tha开发者_如何学JAVAt if each thread has its own udev context everything is fine. However, if calls like udev_new
or udev_monitor_new_from_netlink
would access global/static variables then issues may arise.
Since neither the README or the documentation mentions anything about multithreading I'm asking it here. Does anyknow know something more?
A quick inspection of the udev source suggests that no static/global storage is used, everything appears to be tied to context.
精彩评论