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

Method RegisterCallback

library/cpp/par/par_remote.cpp:133–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 }
132
133 void TRemoteQueryProcessor::RegisterCallback(const TGUID& reqId, IRemoteQueryCancelNotify* notify) {
134 CHROMIUM_TRACE_FUNCTION();
135
136 Y_ABORT_UNLESS(!reqId.IsEmpty());
137 PAR_DEBUG_LOG << "At " << Requester->GetHostAndPort() << " Register cancel callback for request: " << GetGuidAsString(reqId) << Endl;
138 TIntrusivePtr<TQueryResultDst> queryResultDst;
139 auto functor = [notify](TIntrusivePtr<TQueryResultDst>& theQueryResultDst) {
140 theQueryResultDst->CallbackVector.push_back(notify);
141 };
142 if (!IncomingRequestsData.LockedValueModify(reqId, functor)) {
143 PAR_DEBUG_LOG << "At " << Requester->GetHostAndPort() << " No such request in map, probably already sent reply" << Endl;
144 }
145 }
146
147 void TRemoteQueryProcessor::RunMaster(const TVector<TNetworkAddress>& baseSearcherAddrs, unsigned short masterListenPort) {
148 CHROMIUM_TRACE_FUNCTION();

Callers 1

AttachMethod · 0.80

Calls 5

GetGuidAsStringFunction · 0.85
GetHostAndPortMethod · 0.80
LockedValueModifyMethod · 0.80
IsEmptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected