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
timewheel/timewheel.go
下面代码中的 break 似乎只能在 select 中起作用,不能终止外层的 for 循环。是不是应该给外层 for 循环打上 LOOP 标签,使用 break LOOP 来终止外层循环
break
select
for
LOOP
break LOOP
func (t *TimeWheel) run() { for { select { case _ = <-t.ticker.C: t.runTask() case task := <-t.addTaskCh: t.addTask(task, true) case id := <-t.removeTaskCh: t.delTask(id) case _ = <-t.closeCh: t.ticker.Stop() break } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
timewheel/timewheel.go
下面代码中的
break
似乎只能在select
中起作用,不能终止外层的for
循环。是不是应该给外层for
循环打上LOOP
标签,使用break LOOP
来终止外层循环The text was updated successfully, but these errors were encountered: