Locking of resources.