Browse Source

quite weird

lyc8503 4 years ago
parent
commit
b7139fa5a6
1 changed files with 1 additions and 0 deletions
  1. 1 0
      backend_refactor/pool/thread_pool.py

+ 1 - 0
backend_refactor/pool/thread_pool.py

@@ -22,6 +22,7 @@ def worker():
 
 def init_workers(count=2):
     logging.info("Initializing workers...")
+    global q
     q = queue.Queue()
     for _ in range(count):
         threading.Thread(target=worker).start()