diff --git a/paddle/framework/details/buffered_channel.h b/paddle/framework/details/buffered_channel.h index 44bf84eb3098ea93121f4f38094f496cd67cd9f0..4275f919bad83a8e340783a2f01142626ffc7ffc 100644 --- a/paddle/framework/details/buffered_channel.h +++ b/paddle/framework/details/buffered_channel.h @@ -27,11 +27,12 @@ namespace details { // Four of the properties of Buffered Channel: // - A send to a full channel blocks temporarily until a receive from the -// channel or the channel is closed +// channel or the channel is closed. // - A receive from an empty channel blocks temporarily until a send to the -// channel or the channel is closed -// - A send to a closed channel returns false immediately -// - A receive from a closed channel returns false immediately +// channel or the channel is closed. +// - A send to a closed channel returns false immediately. +// - A receive from a closed channel returns false immediately. + template class Buffered : public paddle::framework::Channel { friend Channel* paddle::framework::MakeChannel(size_t); diff --git a/paddle/framework/details/unbuffered_channel.h b/paddle/framework/details/unbuffered_channel.h index 815cebad2d8c08aa31bb566bc6c51250870383d8..bc4233af738c70a14a2d3ea0971586bea756c0e3 100644 --- a/paddle/framework/details/unbuffered_channel.h +++ b/paddle/framework/details/unbuffered_channel.h @@ -23,6 +23,13 @@ namespace paddle { namespace framework { namespace details { +// Four of the properties of UnBuffered Channel: +// - A send to a channel blocks temporarily until a receive from the +// channel or the channel is closed. +// - A receive from a channel blocks temporarily until a send to the +// channel or the channel is closed. +// - A send to a closed channel returns false immediately. +// - A receive from a closed channel returns false immediately. template class UnBuffered : public paddle::framework::Channel { friend Channel* paddle::framework::MakeChannel(size_t);