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

Method LaunchBlockRequest

library/cpp/par/par_exec.h:693–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

691 }
692 }
693 void LaunchBlockRequest(int startIdx, int blockLen) {
694 TIntrusivePtr<TJobRequest> jr = new TJobRequest;
695 TVector<int> resultMap;
696 ProjectJob(&jr->Descr, startIdx, blockLen, &resultMap, &ResultHasData, JobRequest->Descr);
697 jr->EnvId2Version = JobRequest->EnvId2Version;
698 jr->IsLowPriority = JobRequest->IsLowPriority;
699
700 // get new distribution state, start next block in new conditions
701 TIntrusivePtr<TBlockCallback> bc(new TBlockCallback(this, &resultMap));
702 for (;;) {
703 IUserContext::EDataDistrState ds = UserContext->UpdateDataDistrState(&jr->HostId2Computer);
704 if (ds == IUserContext::DATA_UNAVAILABLE) {
705 Cancel();
706 return;
707 }
708
709 if (IsCanceledFlag)
710 return;
711
712 if (LaunchJobRequest(jr.Get(), QueryProc.Get(), UserContext.Get(), bc.Get()))
713 return;
714
715 // can not execute have to wait somehow
716 ThreadYield();
717 }
718 }
719 TSplitMRExec(TJobRequest* jobRequest,
720 TRemoteQueryProcessor* queryProc, IMRCommandCompleteNotify* mrNotify,
721 IUserContext* userContext)

Callers

nothing calls this directly

Calls 6

ProjectJobFunction · 0.85
LaunchJobRequestFunction · 0.85
ThreadYieldFunction · 0.85
CancelFunction · 0.50
UpdateDataDistrStateMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected