文件名称:go-timer-wheel
文件大小:93KB
文件格式:ZIP
更新时间:2024-06-20 17:36:31
Go
go-timer-wheel 基于时间轮的任务超时调度库 ========================= 安装方式 package main import ( "fmt" github.com/zhangwei1234/go-timer-wheel/timerWheel" ) func main() { wheel := timerWheel.NewTimerWheel()//初始化 wheel.Start()//启动 wheel.AddTask(&MyTask{}, 4 * time.Second) } type MyTask struct { } func(tk *MyTask) Expire() { fmt.Printf("-----------------> 执行 \n") } Developing You can run t
【文件预览】:
go-timer-wheel-master
----.project(380B)
----type.go(834B)
----guid.go(434B)
----scheduler_test.go(1KB)
----README.md(529B)
----docs()
--------wheel.png(93KB)
----time_wheel.go(3KB)