We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.我想让不同的comment在不同的goroutine中运行,但是 只看到了handler中的localProcess的注释和schd的定义, 但是没有example,希望可以写个eample演示一下.万分感谢
2.看了下关于分布式的实现,很想知道为什么不用成熟的etcd,consul方案,需要自己实现一下注册中心呢?
The text was updated successfully, but these errors were encountered:
@github-yxb 可以在 session 变量中保存一个 Scheduler,然后把相关的代码调度到对应的 goroutine 中。
component.WithSchedulerName("room")
session.Set("room", currentRoom)
// LocalScheduler schedules task to a customized goroutine type LocalScheduler interface { Schedule(Task) }
这样就会把这个 task 放到这个 session 对应的房间线程执行。
Sorry, something went wrong.
多谢回复! 大致明白了流程,即新链接session需在全局goroutine中做绑定后,后面的消息将由自定义goroutine处理。
No branches or pull requests
1.我想让不同的comment在不同的goroutine中运行,但是
只看到了handler中的localProcess的注释和schd的定义,
但是没有example,希望可以写个eample演示一下.万分感谢
2.看了下关于分布式的实现,很想知道为什么不用成熟的etcd,consul方案,需要自己实现一下注册中心呢?
The text was updated successfully, but these errors were encountered: