c837484015
This helps protect against the device changing unexpectedly from multiple threads, instead of using the global list/library lock.