Skip to content

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
@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

2 participants