| 577 | } |
| 578 | |
| 579 | int64_t Thread::WaitForTid() const { |
| 580 | const string log_prefix = Substitute("$0 ($1) ", name_, category_); |
| 581 | SCOPED_LOG_SLOW_EXECUTION_PREFIX(WARNING, 500 /* ms */, log_prefix, |
| 582 | "waiting for new thread to publish its TID"); |
| 583 | int loop_count = 0; |
| 584 | while (true) { |
| 585 | int64_t t = Acquire_Load(&tid_); |
| 586 | if (t != PARENT_WAITING_TID) return t; |
| 587 | boost::detail::yield(loop_count++); |
| 588 | } |
| 589 | } |
| 590 | |
| 591 | Status Thread::StartThread(string category, string name, |
| 592 | std::function<void()> functor, uint64_t flags, |
nothing calls this directly
no test coverage detected