A.1-4 多事件源支持 — 命名源 + 优先级 + 选择性监听 #27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
来源
Doc-Code Aligner 差距:事件驱动调度循环 → v0.2 目标「多事件源支持」
现状
代码已有
agent.event_queuesdict,支持多个命名队列(通过 DSL 的event_sources声明),但功能停留在「不同队列接收事件」层面:
agent.py:__init__— 已根据sm_def["event_sources"]创建多个队列message_queue待做
dispatch_event支持指定目标event_source(不只是 agent_id)event_queues["urgent"],低优先级进event_queues["batch"]估时
中(1-2 天)
评价
已有基础(未充分测试):
event_sources在 DSL 中已经支持(_resolve_event_queues)_wait_multi_source已经实现(asyncio.FIRST_COMPLETED)_event_buffer)已经实现缺失:
asyncio.PriorityQueue)event_sources字段限定)_wait_multi_source被 Pipeline 测试间接覆盖)建议: 这是一个"补测试 + 加两个小特性"的任务,三件事可以分开做:
_wait_multi_source的测试估算: 中等,3-4 个文件。