From b43321d36ef6160864d2a5a57b2cb5cd4d19d11e Mon Sep 17 00:00:00 2001 From: Migatu Date: Tue, 9 Apr 2024 01:27:14 +0200 Subject: [PATCH] FIX???? --- bot.py | 2 +- communication_subroutine.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index cd51e34..e0814da 100644 --- a/bot.py +++ b/bot.py @@ -2220,7 +2220,7 @@ if __name__ == "__main__": logger.info("Starting discord bot") threads = [] threads.append(threading.Thread(target=client.run, args=(TOKEN,))) - communication_subroutine.comm_subroutine(OUT_COMM_Q) + threads.append(threading.Thread(target=communication_subroutine.comm_subroutine, args=(OUT_COMM_Q,))) for worker in threads: worker.start() for worker in threads: diff --git a/communication_subroutine.py b/communication_subroutine.py index faf18fb..31d72da 100644 --- a/communication_subroutine.py +++ b/communication_subroutine.py @@ -60,5 +60,6 @@ def comm_subroutine(comm_q): for worker in threads: worker.start() + for worker in threads: + worker.join() - return threads