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

Method Start

tensorflow/cc/training/prefetch_runner.cc:49–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void PrefetchRunner::Start() {
50 {
51 mutex_lock l(mu_);
52 thread_nums_ = params_.fetch_ops().size();
53 }
54
55 thread_pool_.resize(thread_nums_);
56 for (size_t i = 0; i < thread_nums_; i++)
57 thread_pool_[i].reset(new std::thread(&PrefetchRunner::Run, this, i));
58
59 if (coord_)
60 cancel_thread_.reset(new std::thread(&PrefetchRunner::Stop, this));
61
62 is_running_ = true;
63}
64
65void PrefetchRunner::Stop() {
66 if (coord_)

Callers 1

StartRunnersMethod · 0.45

Calls 3

sizeMethod · 0.45
resizeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected