Skip to content
New issue

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

fix: backgroundTasksFinished ensure all tasks finished #115

Merged
merged 1 commit into from
Jan 17, 2020

Conversation

dead-horse
Copy link
Member

No description provided.

@@ -390,6 +390,10 @@ module.exports = {
this._backgroundTasks = [];
return Promise.all(tasks).then(() => {
debug('finished %d background tasks', tasks.length);
if (this._backgroundTasks.length) {
Copy link
Member

@atian25 atian25 Jan 17, 2020

Choose a reason for hiding this comment

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

有可能会死循环吧

Copy link
Member Author

Choose a reason for hiding this comment

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

如果死循环了,说明代码写的有问题。

Copy link
Member Author

Choose a reason for hiding this comment

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

那运行代码应该早就 CPU 爆掉了。

先简单处理吧,不增加这里的复杂度了。

Copy link
Member

Choose a reason for hiding this comment

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

喔,是 egg-mock,那无所谓,死循环了更好发现

@dead-horse dead-horse merged commit 51ef091 into master Jan 17, 2020
@atian25 atian25 deleted the fix-backgroundTasksFinished branch January 17, 2020 06:45
@dead-horse
Copy link
Member Author

3.25.1

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