'Run the Bokeh Server until shutdown is requested by the user,
either via a Keyboard interrupt (Ctrl-C) or SIGTERM.'

def run_until_shutdown(self):

    if (not self._started):
        self.start()
    atexit.register(self._atexit)
    signal.signal(signal.SIGTERM, self._sigterm)
    try:
        self._loop.start()
    except KeyboardInterrupt:
        print('\nInterrupted,    shutting    down')
    self.stop()
