device manager thread safety