parameters: ()
docstring: Wait for console exit and stop all model servers.
docstring_summary: Wait for console exit and stop all model servers.
docstring_tokens: Wait for console exit and stop all model servers .
function: def wait():
      '''Wait for console exit and stop all model servers.'''
      try:
          while len(_update_thread_list()) > 0:
              time.sleep(1000)
      except (KeyboardInterrupt, SystemExit):
          sys.stdout.write('\n')
          sys.stdout.flush()
          stop()
function_tokens: def wait ( ) : try : while len ( _update_thread_list ( ) ) > 0 : time . sleep ( 1000 ) except ( KeyboardInterrupt , SystemExit ) : sys . stdout . write ( '\n' ) sys . stdout . flush ( ) stop ( )