Add a global mutex that allows the REPL server to be used more safely while the game loop is running.