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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 protected: | 87 protected: |
88 Runnable() {} | 88 Runnable() {} |
89 | 89 |
90 private: | 90 private: |
91 RTC_DISALLOW_COPY_AND_ASSIGN(Runnable); | 91 RTC_DISALLOW_COPY_AND_ASSIGN(Runnable); |
92 }; | 92 }; |
93 | 93 |
94 // WARNING! SUBCLASSES MUST CALL Stop() IN THEIR DESTRUCTORS! See ~Thread(). | 94 // WARNING! SUBCLASSES MUST CALL Stop() IN THEIR DESTRUCTORS! See ~Thread(). |
95 | 95 |
96 class Thread : public MessageQueue { | 96 class LOCKABLE Thread : public MessageQueue { |
97 public: | 97 public: |
98 // Create a new Thread and optionally assign it to the passed SocketServer. | 98 // Create a new Thread and optionally assign it to the passed SocketServer. |
99 Thread(); | 99 Thread(); |
100 explicit Thread(SocketServer* ss); | 100 explicit Thread(SocketServer* ss); |
101 explicit Thread(std::unique_ptr<SocketServer> ss); | 101 explicit Thread(std::unique_ptr<SocketServer> ss); |
102 | 102 |
103 // NOTE: ALL SUBCLASSES OF Thread MUST CALL Stop() IN THEIR DESTRUCTORS (or | 103 // NOTE: ALL SUBCLASSES OF Thread MUST CALL Stop() IN THEIR DESTRUCTORS (or |
104 // guarantee Stop() is explicitly called before the subclass is destroyed). | 104 // guarantee Stop() is explicitly called before the subclass is destroyed). |
105 // This is required to avoid a data race between the destructor modifying the | 105 // This is required to avoid a data race between the destructor modifying the |
106 // vtable, and the Thread::PreRun calling the virtual method Run(). | 106 // vtable, and the Thread::PreRun calling the virtual method Run(). |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 | 327 |
328 private: | 328 private: |
329 SocketServer* old_ss_; | 329 SocketServer* old_ss_; |
330 | 330 |
331 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SocketServerScope); | 331 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SocketServerScope); |
332 }; | 332 }; |
333 | 333 |
334 } // namespace rtc | 334 } // namespace rtc |
335 | 335 |
336 #endif // WEBRTC_BASE_THREAD_H_ | 336 #endif // WEBRTC_BASE_THREAD_H_ |
OLD | NEW |