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

Refine rpc client wait sync #11132

Merged
merged 13 commits into from
Jun 5, 2018

Conversation

typhoonzero
Copy link
Contributor

@typhoonzero typhoonzero commented Jun 3, 2018

Refine rpc client wait request sync

@typhoonzero typhoonzero changed the title [WIP] Fix dist train terminate core Fix dist train terminate core Jun 4, 2018
@typhoonzero typhoonzero mentioned this pull request Jun 4, 2018
@typhoonzero typhoonzero changed the title Fix dist train terminate core Refine rpc client wait sync Jun 5, 2018
Copy link
Contributor

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

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

Two small questions.

@@ -84,7 +87,7 @@ class BaseProcessor {
context_->set_deadline(deadline);
}

virtual void Process() = 0;
virtual void Process() {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change from pure virtual method to a virtual method?

void RPCClient::Wait() {
std::unique_lock<std::mutex> lk(sync_mutex_);
sync_cond_.wait(lk, [this] { return req_count_ == 0; });
lk.unlock();
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is not needed!

Copy link
Contributor

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

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

LGTM

@gongweibao gongweibao merged commit 036a90f into PaddlePaddle:develop Jun 5, 2018
@typhoonzero typhoonzero deleted the fix_grpc_terminate_core branch June 5, 2018 09:31
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