| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/simple_thread.h" | 5 #include "base/simple_thread.h" |
| 6 | 6 |
| 7 #include "base/waitable_event.h" | |
| 8 #include "base/logging.h" | 7 #include "base/logging.h" |
| 9 #include "base/platform_thread.h" | 8 #include "base/platform_thread.h" |
| 10 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 11 | 10 |
| 12 namespace base { | 11 namespace base { |
| 13 | 12 |
| 14 void SimpleThread::Start() { | 13 void SimpleThread::Start() { |
| 15 DCHECK(!HasBeenStarted()) << "Tried to Start a thread multiple times."; | 14 DCHECK(!HasBeenStarted()) << "Tried to Start a thread multiple times."; |
| 16 bool success = PlatformThread::Create(options_.stack_size(), this, &thread_); | 15 bool success = PlatformThread::Create(options_.stack_size(), this, &thread_); |
| 17 CHECK(success); | 16 CHECK(success); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 108 |
| 110 // A NULL delegate pointer signals us to quit. | 109 // A NULL delegate pointer signals us to quit. |
| 111 if (!work) | 110 if (!work) |
| 112 break; | 111 break; |
| 113 | 112 |
| 114 work->Run(); | 113 work->Run(); |
| 115 } | 114 } |
| 116 } | 115 } |
| 117 | 116 |
| 118 } // namespace base | 117 } // namespace base |
| OLD | NEW |