diff --git a/poker_ai/ai/agent.py b/poker_ai/ai/agent.py index 78b65ebd..64b63c5e 100644 --- a/poker_ai/ai/agent.py +++ b/poker_ai/ai/agent.py @@ -5,7 +5,8 @@ import joblib -manager = mp.Manager() +if __name__ == "__main__": + manager = mp.Manager() class Agent: diff --git a/poker_ai/ai/multiprocess/server.py b/poker_ai/ai/multiprocess/server.py index a4226602..949a4670 100644 --- a/poker_ai/ai/multiprocess/server.py +++ b/poker_ai/ai/multiprocess/server.py @@ -12,8 +12,9 @@ from poker_ai.games.short_deck import state from poker_ai.ai.multiprocess.worker import Worker -log = logging.getLogger("sync.server") -manager = mp.Manager() +if __name__ == "__main__": + log = logging.getLogger("sync.server") + manager = mp.Manager() class Server: