def sync(self):
    '\n        Process all items on the queue to ensure it is up to date.\n        '
    if self._worker:
        self.flush()
    elif (self._threadsafe and (not self._worker)):
        for buffer_ in self._drain_queue():
            for (key, value) in buffer_.items():
                self._data[key] = (self._data.get(key) + value)
Process all items on the queue to ensure it is up to date.
def sync(self):
    '\n        \n        '
    if self._worker:
        self.flush()
    elif (self._threadsafe and (not self._worker)):
        for buffer_ in self._drain_queue():
            for (key, value) in buffer_.items():
                self._data[key] = (self._data.get(key) + value)