MCPcopy Create free account
hub / github.com/dmlc/parameter_server / queue

Method queue

src/system/postoffice.cc:192–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void Postoffice::queue(const MessagePtr& msg) {
193 if (msg->valid) {
194 sending_queue_.push(msg);
195 } else {
196 // do not send, fake a reply mesage
197 Task tk;
198 tk.set_customer(msg->task.customer());
199 tk.set_request(false);
200 tk.set_type(Task::REPLY);
201 tk.set_time(msg->task.time());
202 MessagePtr reply(new Message(tk));
203 reply->sender = msg->recver;
204 reply->recver = msg->sender;
205 yp().customer(tk.customer())->exec().accept(reply);
206 }
207}
208
209// TODO fault tolerance, check if node info has been changed
210void Postoffice::send() {

Callers 2

processMethod · 0.80
submitMethod · 0.80

Calls 8

set_customerMethod · 0.80
customerMethod · 0.80
set_requestMethod · 0.80
acceptMethod · 0.80
pushMethod · 0.45
set_typeMethod · 0.45
set_timeMethod · 0.45
timeMethod · 0.45

Tested by

no test coverage detected