From d1fccb8d84a7d803e685dac24d3511c4a505c842 Mon Sep 17 00:00:00 2001 From: JIAKUNHAO Date: Thu, 24 Nov 2022 10:11:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E5=B1=80ws?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/configs/global_var.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/configs/global_var.py b/app/configs/global_var.py index bb2add3..5a37eec 100644 --- a/app/configs/global_var.py +++ b/app/configs/global_var.py @@ -10,9 +10,18 @@ def _init(): # 初始化 + # 中断标志 global _global_dict _global_dict = {} + # ws列表存储 + global active_connections + active_connections = multiprocessing.Manager().list() + + # ws字典存储 + global active_connections_dist + active_connections_dist = multiprocessing.Manager().dict() + def set_value(key, value): # 定义一个全局变量