'Set the update `loop` coroutine.
The `loop` is a generator yielding `(embedding, stress, progress)`
tuples where `embedding` is a `(N, 2) ndarray` of current updated
MDS points, `stress` is the current stress and `progress` a float
ratio (0 <= progress <= 1)
If an existing update coroutine loop is already in palace it is
interrupted (i.e. closed).
.. note::
The `loop` must not explicitly yield control flow to the event
loop (i.e. call `QApplication.processEvents`)'

def __set_update_loop(self, loop):

    if (self.__update_loop is not None):
        self.__update_loop.close()
        self.__update_loop = None
        self.progressBarFinished(processEvents=None)
    self.__update_loop = loop
    if (loop is not None):
        self.setBlocking(True)
        self.progressBarInit(processEvents=None)
        self.setStatusMessage('Running')
        self.runbutton.setText('Stop')
        self.__state = OWMDS.Running
        self.__timer.start()
    else:
        self.setBlocking(False)
        self.setStatusMessage('')
        self.runbutton.setText('Start')
        self.__state = OWMDS.Finished
        self.__timer.stop()
