Skip to content

SelectorManager增加stopped状态#5

Open
yantzu wants to merge 1 commit intokillme2008:masterfrom
yantzu:master
Open

SelectorManager增加stopped状态#5
yantzu wants to merge 1 commit intokillme2008:masterfrom
yantzu:master

Conversation

@yantzu
Copy link

@yantzu yantzu commented Feb 14, 2017

在stopped状态,await应该异常退出,否则则进入是死循环

return;
}
this.started = true;
this.started = true;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

缩进不正确。

}

if (this.stopped) {
throw new IllegalStateException("SelectorManager was stopped");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

似乎静默更好点。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不好意思,不懂,什么静默?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

大神看我提的metaq issue:killme2008/Metamorphosis#129
客户端存在进入死循环,不强杀不退出的可能。

我的看法是,既然已经stop了,就不能再继续等,应该直接抛异常了。如果觉得这样不好,那有一种情况一定要抛异常,就是while语句为true,而线程又被interrupt,在这种情况下,状态已经不会变了,只能等整个程序退出。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我们的流集群崩溃,然后任务大面积卡住,哈,监控不全,哪些卡住都不知道

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

卡住是个什么概念?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

就是java进程不退出,kill命令发出去也不行,一定要kill -9才能杀掉。进程不退,占住metaq,新起来的又消费不了。

@killme2008
Copy link
Owner

killme2008 commented Mar 24, 2017 via email

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.

2 participants