MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / FlowControlRecv

Method FlowControlRecv

tensorflow/core/framework/rendezvous.cc:156–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156Status Rendezvous::FlowControlRecv(const StringPiece& tag, const ParsedKey& key,
157 const Args& args, Tensor* val, bool* is_dead,
158 int64 timeout_ms) {
159 Status ret;
160 Notification n;
161 FlowControlRecvAsync(tag, key, args, [&ret, &n, val, is_dead](
162 const Status& s, const Args& send_args,
163 const Args& recv_args, const Tensor& v,
164 const bool dead) {
165 ret = s;
166 *val = v;
167 *is_dead = dead;
168 n.Notify();
169 });
170 if (timeout_ms > 0) {
171 int64 timeout_us = timeout_ms * 1000;
172 bool notified = WaitForNotificationWithTimeout(&n, timeout_us);
173 if (!notified) {
174 return Status(error::DEADLINE_EXCEEDED,
175 "Timed out waiting for notification");
176 }
177 } else {
178 n.WaitForNotification();
179 }
180 return ret;
181}
182
183Status Rendezvous::FlowControlRecv(const StringPiece& tag, const ParsedKey& key,
184 const Args& args, Tensor* val,

Callers 4

RecvStringMethod · 0.80
RecvStringSliceMethod · 0.80
RecvBasicTypeMethod · 0.80
RecvFileSliceMethod · 0.80

Calls 4

StatusClass · 0.50
NotifyMethod · 0.45
WaitForNotificationMethod · 0.45

Tested by

no test coverage detected