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

Method GetPendingDataSize

library/cpp/netliba/v12/udp_http.cpp:1035–1043  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1033 return req->PeerAddress;
1034 }
1035 void GetPendingDataSize(TRequesterPendingDataStats* res) override {
1036 auto promise = NThreading::NewPromise<TRequesterPendingDataStats>();
1037 Host->GetAllPendingDataSize([promise](const TRequesterPendingDataStats& stat, const TColoredRequesterPendingDataStats& /*coloredStat*/) mutable {
1038 promise.SetValue(stat);
1039 });
1040 auto future = promise.GetFuture();
1041 future.Wait();
1042 *res = future.GetValue();
1043 }
1044 void GetAllPendingDataSize(TRequesterPendingDataStats* total, TColoredRequesterPendingDataStats* colored) override {
1045 auto promise = NThreading::NewPromise<std::pair<TRequesterPendingDataStats, TColoredRequesterPendingDataStats>>();
1046 Host->GetAllPendingDataSize([promise](const TRequesterPendingDataStats& stat, const TColoredRequesterPendingDataStats& coloredStat) mutable {

Callers

nothing calls this directly

Calls 5

GetAllPendingDataSizeMethod · 0.45
SetValueMethod · 0.45
GetFutureMethod · 0.45
WaitMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected