Lock mutexes in ResourceLoader