Skip to content

Conversation

@yeaha
Copy link

@yeaha yeaha commented Mar 10, 2023

提供SetTaskRunner()方法,允许自行实现任务具体的执行方式

例如可以使用goroutine pool进一步提高并发执行效率

import (
  "github.com/panjf2000/ants"
  "github.com/RussellLuo/timingwheel"
)

func init() {
  timingwheel.SetTaskRunner(func(task func()) {
    ants.Submit(task)
  })
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant