MCPcopy Create free account
hub / github.com/catboost/catboost / DoSendCycle

Method DoSendCycle

library/cpp/neh/tcp.cpp:457–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455 }
456
457 inline void DoSendCycle(TCont* c) {
458 if (int ret = NCoro::ConnectI(c, S, P->RI->Addr)) {
459 ythrow TSystemError(ret) << "can't connect";
460 }
461 SetNoDelay(S, true);
462 Executor()->Create<TLink, &TLink::RecvCycle>(this, "recv");
463
464 TVector<TRequestPtr> reqs;
465 TParts parts;
466
467 while (Dequeue(P->Q, reqs, 7000)) {
468 for (size_t i = 0; i < reqs.size(); ++i) {
469 TRequestPtr& req = reqs[i];
470
471 req->Serialize(parts);
472 InFly[LocalGuid(req->Guid)] = req;
473 }
474
475 {
476 TContIOVector vec(parts.data(), parts.size());
477 NCoro::WriteVectorI(c, S, &vec);
478 }
479
480 reqs.clear();
481 parts.Clear();
482 }
483 }
484
485 void RecvCycle(TCont* c) {
486 TIntrusivePtr<TLink> self(this);

Callers

nothing calls this directly

Calls 10

ConnectIFunction · 0.85
SetNoDelayFunction · 0.85
LocalGuidFunction · 0.85
WriteVectorIFunction · 0.85
DequeueFunction · 0.70
sizeMethod · 0.45
SerializeMethod · 0.45
dataMethod · 0.45
clearMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected