Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

There is now a \Drupal::lock() function, which returns an instance of the locking layer.

Drupal 7 (these functions have been removed)

<?php
lock_acquire
($name, $timeout);
lock_wait($name, $delay);
lock_release($name);
lock_release_all($lock_id);
?>

Drupal 8

<?php
$lock
= \Drupal::lock();
$lock->acquire($name, $timeout);
$lock->wait($name, $delay);
$lock->release($name);
$lock->releaseAll($lock_id);
?>

Additionally, the functionality in _lock_id() has been moved to LockBackendInterface::getLockId().

Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done