| 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 { |
| 1047 | promise.SetValue({stat, coloredStat}); |
| 1048 | }); |
| 1049 | auto future = promise.GetFuture(); |
| 1050 | future.Wait(); |
| 1051 | auto resData = future.GetValue(); |
| 1052 | *total = resData.first; |
| 1053 | colored->Swap(resData.second); |
| 1054 | } |
| 1055 | bool HasRequest(const TGUID& reqId) override { |
| 1056 | TIntrusivePtr<TStatsRequest> req = new TStatsRequest(TStatsRequest::HAS_IN_REQUEST); |
| 1057 | req->RequestId = reqId; |