Merge branch 'dev' of github.com:Microsoft/multiverso-next into dev
This commit is contained in:
Коммит
45d8b53053
|
@ -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());
|
||||
|
|
Загрузка…
Ссылка в новой задаче