original_docstring: Release ownership of the PID file.
docstring: Release ownership of the PID file.
docstring_tokens: Release ownership of the PID file .
code: def release(self) -> None:
          """Release ownership of the PID file."""
          # If we did not lock the file,
          # unlocking would unlock someone else's lock.
          # So do not even attempt it if we do not have the handle.
          file_handle = self._file_handle
          if file_handle is None:
              return
          # Remove the PID first.
          file_handle.seek(0)
          file_handle.truncate()
          # Closing automatically unlocks.
          file_handle.close()
          # Mark as unlocked.
          self._file_handle = None
code_tokens: def release ( self ) -> None : file_handle = self . _file_handle if file_handle is None : return file_handle . seek ( 0 ) file_handle . truncate ( ) file_handle . close ( ) self . _file_handle = None
short_docstring: Release ownership of the PID file.
short_docstring_tokens: Release ownership of the PID file .
comment: """Release ownership of the PID file."""$SEP$# If we did not lock the file,$SEP$# unlocking would unlock someone else's lock.$SEP$# So do not even attempt it if we do not have the handle.$SEP$# Remove the PID first.$SEP$# Closing automatically unlocks.$SEP$# Mark as unlocked.