feat(common): 添加无锁并发工具包依赖

新增 lockfree-1.1.3 工具包到 go.work 文件中,为项目提供无锁并发数据结构支持,
提升高并发场景下的性能表现。
This commit is contained in:
2025-12-05 00:36:28 +08:00
parent 43813932c9
commit 269256a861
40 changed files with 2900 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
/*
* Copyright (C) THL A29 Limited, a Tencent company. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
*/
package lockfree
// EventHandler 事件处理器接口
// 整个无锁队列中唯一需要用户实现的接口,该接口描述消费端收到消息时该如何处理
// 使用泛型,通过编译阶段确定事件类型,提高性能
type EventHandler[T any] interface {
// OnEvent 用户侧实现,事件处理方法
OnEvent(t T)
}