(self)
Lock buffer to collect updates and submit them in one go.
Lock buffer to collect updates and submit them in one go.
Lock buffer to collect updates and submit them in one go .
def collect_updates(self):
        """Lock buffer to collect updates and submit them in one go."""
        if self._locked:
            # nested call - only lock/unlock outermost
            yield
        else:
            self._locked = True
            try:
                yield
            finally:
                self._locked = False
                self.force_submit()
def collect_updates ( self ) : if self . _locked : # nested call - only lock/unlock outermost yield else : self . _locked = True try : yield finally : self . _locked = False self . force_submit ( )