Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a new UeventSender.sender object for every uevent call
The UeventSender.sender class uses libudev under the covers. libudev's documentation (referenced below) states: > Only a single specific thread may operate on a given object during its > entire lifetime. It's safe to allocate multiple independent objects > and use each from a specific thread in parallel. However, it's not > safe to allocate such an object in one thread, and operate or free it > from any other, even if locking is used to ensure these threads don't > operate on it at the very same time. Therefore, if a test is multi-threaded and one thread calls to add devices the object might be created on that thread, then later another thread might remove the device and attempt to use the same object. For example, this can very easily happen in a ROS python-based environment where ROS spawns a new thread for each callback. Reference: https://www.freedesktop.org/software/systemd/man/latest/libudev.html
- Loading branch information