You are here

protected function Comment::releaseThreadLock in Drupal 8

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

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

1 call to Comment::releaseThreadLock()
Comment::postSave in core/modules/comment/src/Entity/Comment.php
Acts on a saved entity before the insert or update hook is invoked.

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 = '';
  }
}