Merge branch 'dev' of github.com:Microsoft/multiverso-next into dev

This commit is contained in:
feiga 2016-03-05 20:48:39 +08:00
Родитель 3a87b78aee 6789e4e230
Коммит 45d8b53053
3 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -53,7 +53,7 @@ public:
virtual void ProcessGet(const std::vector<Blob>& data,
std::vector<Blob>* result) = 0;
const std::string name() { return std::string(typeid(this).name());};
const std::string name() const { return std::string(typeid(this).name());};
// add user defined server process logic
void Process(const std::string instruction, const std::vector<Blob>& data, std::vector<Blob>* result = nullptr);

Просмотреть файл

@ -52,10 +52,6 @@ void Communicator::Main() {
while (mailbox_->Alive()) {
// Try pop and Send
if (mailbox_->TryPop(msg)) {
if (msg->type() == MsgType::Control_Barrier)
{
Log::Debug("rank %d send a control_barrier msg\n", Zoo::Get()->rank());
}
ProcessMessage(msg);
}
// Probe and Recv

Просмотреть файл

@ -11,10 +11,9 @@ public:
explicit BarrierController(Controller* parent) : parent_(parent) {}
void Control(MessagePtr& msg) {
Log::Debug("rank 0 control receive barrier msg from rank %d \n", msg->src());
tasks_.push_back(std::move(msg));
if (tasks_.size() == Zoo::Get()->size()) {
Log::Debug("rank 0 control receive all barrier msg\n");
Log::Debug("All nodes barrieded. System contains %d nodes.\n", Zoo::Get()->size());
MessagePtr my_reply; // my reply should be the last one
for (auto& msg : tasks_) {
MessagePtr reply(msg->CreateReplyMessage());