original_docstring: release the lock and execute callback function if any
  
          If the lock has been acquired multiple times, the actual release is
          delayed to the last release call.
docstring: release the lock and execute callback function if any
  If the lock has been acquired multiple times, the actual release is
  delayed to the last release call.
docstring_tokens: release the lock and execute callback function if any If the lock has been acquired multiple times the actual release is delayed to the last release call .
code: def release(self):
          """release the lock and execute callback function if any
  
          If the lock has been acquired multiple times, the actual release is
          delayed to the last release call."""
          if self.held > 1:
              self.held -= 1
          elif self.held == 1:
              self.held = 0
              if self._getpid() != self.pid:
                  # we forked, and are not the parent
                  return
              try:
                  if self.releasefn:
                      self.releasefn()
              finally:
                  if not self._parentheld:
                      try:
                          self.vfs.unlink(self.f)
                      except OSError:
                          pass
              # The postrelease functions typically assume the lock is not held
              # at all.
              if not self._parentheld:
                  for callback in self.postrelease:
                      callback()
                  # Prevent double usage and help clear cycles.
                  self.postrelease = None
code_tokens: def release ( self ) : if self . held > 1 : self . held -= 1 elif self . held == 1 : self . held = 0 if self . _getpid ( ) != self . pid : return try : if self . releasefn : self . releasefn ( ) finally : if not self . _parentheld : try : self . vfs . unlink ( self . f ) except OSError : pass if not self . _parentheld : for callback in self . postrelease : callback ( ) self . postrelease = None
short_docstring: release the lock and execute callback function if any
  If the lock has been acquired multiple times, the actual release is
  delayed to the last release call.
short_docstring_tokens: release the lock and execute callback function if any If the lock has been acquired multiple times the actual release is delayed to the last release call .
comment: """release the lock and execute callback function if any
  
          If the lock has been acquired multiple times, the actual release is
          delayed to the last release call."""$SEP$# we forked, and are not the parent$SEP$# The postrelease functions typically assume the lock is not held$SEP$# at all.$SEP$# Prevent double usage and help clear cycles.