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

Function SelectD

library/cpp/coroutine/engine/network.cpp:30–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29
30 int SelectD(TCont* cont, SOCKET fds[], int what[], size_t nfds, SOCKET* outfd, TInstant deadline) noexcept {
31 if (cont->Cancelled()) {
32 return ECANCELED;
33 }
34
35 if (nfds == 0) {
36 return 0;
37 }
38
39 TTempArray<TFdEvent> events(nfds);
40
41 for (auto i : xrange(nfds)) {
42 new(events.Data() + i) TFdEvent(cont, fds[i], (ui16) what[i], deadline);
43 }
44
45 Y_DEFER {
46 for (auto i : xrange(nfds)) {
47 (events.Data() + i)->~TFdEvent();
48 }
49 };
50
51 for (auto i : xrange(nfds)) {

Callers 2

SelectTFunction · 0.85
SelectIFunction · 0.85

Calls 4

xrangeFunction · 0.85
CancelledMethod · 0.80
~TFdEventMethod · 0.80
DataMethod · 0.45

Tested by

no test coverage detected