Gabriel Charette | 3fb9e4f | 2018-05-18 21:34:43 | [diff] [blame] | 1 | // Copyright 2018 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Gabriel Charette | 52fa3ae | 2019-04-15 21:44:37 | [diff] [blame] | 5 | #include "base/task/thread_pool/service_thread.h" |
Gabriel Charette | 3fb9e4f | 2018-05-18 21:34:43 | [diff] [blame] | 6 | |
Gabriel Charette | 3fb9e4f | 2018-05-18 21:34:43 | [diff] [blame] | 7 | #include "base/debug/alias.h" |
Gabriel Charette | 3fb9e4f | 2018-05-18 21:34:43 | [diff] [blame] | 8 | |
| 9 | namespace base { |
| 10 | namespace internal { |
| 11 | |
Francois Doray | aef33f34 | 2020-11-30 18:38:57 | [diff] [blame^] | 12 | ServiceThread::ServiceThread() : Thread("ThreadPoolServiceThread") {} |
Gabriel Charette | 3fb9e4f | 2018-05-18 21:34:43 | [diff] [blame] | 13 | |
| 14 | NOINLINE void ServiceThread::Run(RunLoop* run_loop) { |
Gabriel Charette | 3fb9e4f | 2018-05-18 21:34:43 | [diff] [blame] | 15 | Thread::Run(run_loop); |
Olivier Li | 19d8925 | 2020-05-13 17:57:55 | [diff] [blame] | 16 | // Inhibit tail calls of Run and inhibit code folding. |
| 17 | const int line_number = __LINE__; |
Gabriel Charette | 3fb9e4f | 2018-05-18 21:34:43 | [diff] [blame] | 18 | base::debug::Alias(&line_number); |
| 19 | } |
| 20 | |
Gabriel Charette | 3fb9e4f | 2018-05-18 21:34:43 | [diff] [blame] | 21 | } // namespace internal |
| 22 | } // namespace base |