'A context manager that waits for all commands in this stream to execute
and commits any pending memory transfers upon exiting the context.'

@contextlib.contextmanager
def auto_synchronize(self):

    (yield self)
    self.synchronize()
