| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 class SignalThread | 39 class SignalThread |
| 40 : public sigslot::has_slots<>, | 40 : public sigslot::has_slots<>, |
| 41 protected MessageHandler { | 41 protected MessageHandler { |
| 42 public: | 42 public: |
| 43 SignalThread(); | 43 SignalThread(); |
| 44 | 44 |
| 45 // Context: Main Thread. Call before Start to change the worker's name. | 45 // Context: Main Thread. Call before Start to change the worker's name. |
| 46 bool SetName(const std::string& name, const void* obj); | 46 bool SetName(const std::string& name, const void* obj); |
| 47 | 47 |
| 48 // Context: Main Thread. Call before Start to change the worker's priority. | |
| 49 bool SetPriority(ThreadPriority priority); | |
| 50 | |
| 51 // Context: Main Thread. Call to begin the worker thread. | 48 // Context: Main Thread. Call to begin the worker thread. |
| 52 void Start(); | 49 void Start(); |
| 53 | 50 |
| 54 // Context: Main Thread. If the worker thread is not running, deletes the | 51 // Context: Main Thread. If the worker thread is not running, deletes the |
| 55 // object immediately. Otherwise, asks the worker thread to abort processing, | 52 // object immediately. Otherwise, asks the worker thread to abort processing, |
| 56 // and schedules the object to be deleted once the worker exits. | 53 // and schedules the object to be deleted once the worker exits. |
| 57 // SignalWorkDone will not be signalled. If wait is true, does not return | 54 // SignalWorkDone will not be signalled. If wait is true, does not return |
| 58 // until the thread is deleted. | 55 // until the thread is deleted. |
| 59 void Destroy(bool wait); | 56 void Destroy(bool wait); |
| 60 | 57 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 int refcount_; | 145 int refcount_; |
| 149 | 146 |
| 150 RTC_DISALLOW_COPY_AND_ASSIGN(SignalThread); | 147 RTC_DISALLOW_COPY_AND_ASSIGN(SignalThread); |
| 151 }; | 148 }; |
| 152 | 149 |
| 153 /////////////////////////////////////////////////////////////////////////////// | 150 /////////////////////////////////////////////////////////////////////////////// |
| 154 | 151 |
| 155 } // namespace rtc | 152 } // namespace rtc |
| 156 | 153 |
| 157 #endif // WEBRTC_BASE_SIGNALTHREAD_H_ | 154 #endif // WEBRTC_BASE_SIGNALTHREAD_H_ |
| OLD | NEW |