(pipe_main, queue_subproc, port, max_players, mode, stop_timeout)
Creates a network thread
Creates a network thread
Creates a network thread
def thread(pipe_main, queue_subproc, port, max_players, mode, stop_timeout):
    """Creates a network thread"""
    # Note: Multiple threads are used so globals are used to share data b/w them
    global MAX_PLAYERS, PIPE_MAIN, QUEUE_SUBPROC, MODE, STOP_TIMEOUT
    MAX_PLAYERS = max_players
    PIPE_MAIN = pipe_main
    QUEUE_SUBPROC = queue_subproc
    MODE = mode
    STOP_TIMEOUT = stop_timeout
    ws_thread = threading.Thread(target=_run_server, args=(port,))
    ws_thread.start()
    asyncio.set_event_loop(asyncio.new_event_loop())
    asyncio.get_event_loop().run_until_complete(program_loop())
    asyncio.get_event_loop().run_forever()
    ws_thread.join()
def thread ( pipe_main , queue_subproc , port , max_players , mode , stop_timeout ) : # Note: Multiple threads are used so globals are used to share data b/w them global MAX_PLAYERS , PIPE_MAIN , QUEUE_SUBPROC , MODE , STOP_TIMEOUT MAX_PLAYERS = max_players PIPE_MAIN = pipe_main QUEUE_SUBPROC = queue_subproc MODE = mode STOP_TIMEOUT = stop_timeout ws_thread = threading . Thread ( target = _run_server , args = ( port , ) ) ws_thread . start ( ) asyncio . set_event_loop ( asyncio . new_event_loop ( ) ) asyncio . get_event_loop ( ) . run_until_complete ( program_loop ( ) ) asyncio . get_event_loop ( ) . run_forever ( ) ws_thread . join ( )