'Override to implement custom flushing behaviour.
This version just zaps the buffer to empty.'

def flush(self):

    self.acquire()
    try:
        self.buffer = []
    finally:
        self.release()
