parameters: (self)
docstring: Release any owned resources and clean up.
docstring_summary: Release any owned resources and clean up.
docstring_tokens: Release any owned resources and clean up .
function: def close(self):
          """Release any owned resources and clean up."""
          with self._closedlock:
              if self._closed:
                  if self.FAIL_ON_ALREADY_CLOSED:
                      raise ClosedError('already closed')
                  return
              self._closed = True
              handlers = list(self._handlers)
  
          results = call_all(handlers, True)
          self._log_results(results)
          self._close()
          results = call_all(handlers, False)
          self._log_results(results)
function_tokens: def close ( self ) : with self . _closedlock : if self . _closed : if self . FAIL_ON_ALREADY_CLOSED : raise ClosedError ( 'already closed' ) return self . _closed = True handlers = list ( self . _handlers ) results = call_all ( handlers , True ) self . _log_results ( results ) self . _close ( ) results = call_all ( handlers , False ) self . _log_results ( results )