MCPcopy Create free account
hub / github.com/shidenggui/easyquant / __init__

Method __init__

easyquant/event_engine.py:17–29  ·  view source on GitHub ↗

初始化事件引擎

(self)

Source from the content-addressed store, hash-verified

15 """事件驱动引擎"""
16
17 def __init__(self):
18 """初始化事件引擎"""
19 # 事件队列
20 self.__queue = Queue()
21
22 # 事件引擎开关
23 self.__active = False
24
25 # 事件引擎处理线程
26 self.__thread = Thread(target=self.__run, name="EventEngine.__thread")
27
28 # 事件字典,key 为时间, value 为对应监听事件函数的列表
29 self.__handlers = defaultdict(list)
30
31 def __run(self):
32 """启动引擎"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected