code: public function remove()
      {
          if (is_resource($this->mutex)) {
              sem_remove($this->mutex);
          }
  
          if (file_exists($this->file)) {
              unlink($this->file);
          }
      }
docs: Remove semaphore.