You are here

protected function Comment::releaseThreadLock in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::releaseThreadLock()
  2. 9 core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::releaseThreadLock()

Release the lock acquired for the thread in preSave().

File

core/modules/comment/src/Entity/Comment.php, line 178

Class

Comment
Defines the comment entity class.

Namespace

Drupal\comment\Entity

Code

protected function releaseThreadLock() {
  if ($this->threadLock) {
    \Drupal::lock()
      ->release($this->threadLock);
    $this->threadLock = '';
  }
}