'Internal version of autoflush() with no locking.'

def _autoflush(self):

    if (not self.autoflush_enabled()):
        return
    if ((AUTOFLUSH_EVERY_SECONDS and (self.age() >= AUTOFLUSH_EVERY_SECONDS)) or (AUTOFLUSH_EVERY_LINES and (self.lines() >= AUTOFLUSH_EVERY_LINES)) or (AUTOFLUSH_EVERY_BYTES and (self.bytes() >= AUTOFLUSH_EVERY_BYTES))):
        self._flush()
