MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Start

Method Start

tensorflow/contrib/star/star_server_base_lib.cc:366–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366Status StarServerBase::Start() {
367 mutex_lock l(mu_);
368 switch (state_) {
369 case NEW: {
370 master_thread_.reset(
371 env_->StartThread(ThreadOptions(), "TF_master_service",
372 [this] { master_service_->HandleRPCsLoop(); }));
373 state_ = STARTED;
374 LOG(INFO) << "[Distributed] Started server with target: "
375 << target();
376 return Status::OK();
377 }
378 case STARTED:
379 LOG(INFO) << "[Distributed] Server already started (target: "
380 << target() << ")";
381 return Status::OK();
382 case STOPPED:
383 return errors::FailedPrecondition(
384 "[Distributed] Server has stopped.");
385 default:
386 LOG(FATAL);
387 }
388 return Status::OK();
389}
390
391Status StarServerBase::Stop() {
392 mutex_lock l(mu_);

Callers

nothing calls this directly

Calls 5

ThreadOptionsClass · 0.85
FailedPreconditionFunction · 0.85
resetMethod · 0.45
StartThreadMethod · 0.45
HandleRPCsLoopMethod · 0.45

Tested by

no test coverage detected