original_string: public function free()
      {
          if (is_resource($this->queue) && msg_queue_exists($this->key)) {
              if (!msg_remove_queue($this->queue)) {
                  throw new SemaphoreException('Failed to free the semaphore.');
              }
  
              $this->queue = null;
          }
      }
code: public function free()
      {
          if (is_resource($this->queue) && msg_queue_exists($this->key)) {
              if (!msg_remove_queue($this->queue)) {
                  throw new SemaphoreException('Failed to free the semaphore.');
              }
  
              $this->queue = null;
          }
      }
code_tokens: public function free ( ) { if ( is_resource ( $ this -> queue ) && msg_queue_exists ( $ this -> key ) ) { if ( ! msg_remove_queue ( $ this -> queue ) ) { throw new SemaphoreException ( 'Failed to free the semaphore.' ) ; } $ this -> queue = null ; } }
docstring: Removes the semaphore if it still exists.
  
  @throws SemaphoreException If the operation failed.
docstring_tokens: Removes the semaphore if it still exists .