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

Function WriteVectorD

library/cpp/coroutine/engine/network.cpp:158–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156
157
158 TContIOStatus WriteVectorD(TCont* cont, SOCKET fd, TContIOVector* vec, TInstant deadline) noexcept {
159 size_t written = 0;
160
161 while (!vec->Complete()) {
162 ssize_t res = DoWriteVector(fd, vec);
163
164 if (res >= 0) {
165 written += res;
166
167 vec->Proceed((size_t) res);
168 } else {
169 {
170 const int err = LastSystemError();
171
172 if (!IsBlocked(err)) {
173 return TContIOStatus(written, err);
174 }
175 }
176
177 if ((res = PollD(cont, fd, CONT_POLL_WRITE, deadline)) != 0) {
178 return TContIOStatus(written, (int) res);
179 }
180 }
181 }
182
183 return TContIOStatus::Success(written);
184 }
185
186 TContIOStatus WriteVectorT(TCont* cont, SOCKET fd, TContIOVector* vec, TDuration timeOut) noexcept {
187 return WriteVectorD(cont, fd, vec, timeOut.ToDeadLine());

Callers 3

WriteVectorTFunction · 0.85
WriteVectorIFunction · 0.85
WriteDFunction · 0.85

Calls 7

DoWriteVectorFunction · 0.85
LastSystemErrorFunction · 0.85
TContIOStatusClass · 0.85
CompleteMethod · 0.80
IsBlockedFunction · 0.70
PollDFunction · 0.70
ProceedMethod · 0.45

Tested by

no test coverage detected