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

Function RunSlave

library/cpp/par/par_host.cpp:81–93  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

79
80 //////////////////////////////////////////////////////////////////////////
81 void RunSlave(int workerThreadCount, int port) {
82 InitNetworkSubSystem();
83 LocalExecutor().RunAdditionalThreads(workerThreadCount);
84
85 TIntrusivePtr<TRemoteQueryProcessor> qp(new TRemoteQueryProcessor);
86 TIntrusivePtr<TWriteBufferHandler> wb(new TWriteBufferHandler(qp.Get()));
87 TIntrusivePtr<TContextReplica> context(new TContextReplica(qp.Get(), wb->GetWriteBuffer()));
88 TIntrusivePtr<TMRCmdsProcessor> mr(new TMRCmdsProcessor(qp.Get(), context.Get()));
89 qp->RunSlave(port);
90 Y_ASSERT(LocalExecutor().GetQueueSize() == 0);
91 LocalExecutor().ClearLPQueue();
92 qp->Stop();
93 }
94
95 IRootEnvironment* RunLocalMaster(int workerThreadCount) {
96 LocalExecutor().RunAdditionalThreads(workerThreadCount);

Callers

nothing calls this directly

Calls 8

InitNetworkSubSystemFunction · 0.85
RunAdditionalThreadsMethod · 0.80
RunSlaveMethod · 0.80
GetQueueSizeMethod · 0.80
ClearLPQueueMethod · 0.80
GetMethod · 0.45
GetWriteBufferMethod · 0.45
StopMethod · 0.45

Tested by

no test coverage detected