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

Redesign channel implementation for Select Op #8814

Merged
merged 3 commits into from
Mar 6, 2018

Conversation

abhinavarora
Copy link
Contributor

@abhinavarora abhinavarora commented Mar 6, 2018

Fixes #8812

Like Go, we will also have one single implementation for both buffered and unbuffered channels.
References:

  1. Channel Send - https://github.com/golang/go/blob/master/src/runtime/chan.go#L140
  2. Channel Receive - https://github.com/golang/go/blob/master/src/runtime/chan.go#L417
  3. Channel Close - https://github.com/golang/go/blob/master/src/runtime/chan.go#L327

cs2be
cs2be previously approved these changes Mar 6, 2018
Copy link
Contributor

@cs2be cs2be left a comment

Choose a reason for hiding this comment

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

LGTM

if (closed_ && buf_.empty()) {
lock.unlock();
return recv_return(false);
// return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

can remove this

@abhinavarora abhinavarora merged commit 78c884d into PaddlePaddle:develop Mar 6, 2018
Concurrent Programming in Fluid automation moved this from To Do to Done Mar 6, 2018
@abhinavarora abhinavarora deleted the redesign_channel branch March 6, 2018 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants