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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 | 63 |
64 void AddInternal(MessageQueue *message_queue); | 64 void AddInternal(MessageQueue *message_queue); |
65 void RemoveInternal(MessageQueue *message_queue); | 65 void RemoveInternal(MessageQueue *message_queue); |
66 void ClearInternal(MessageHandler *handler); | 66 void ClearInternal(MessageHandler *handler); |
67 void ProcessAllMessageQueuesInternal(); | 67 void ProcessAllMessageQueuesInternal(); |
68 | 68 |
69 static MessageQueueManager* instance_; | 69 static MessageQueueManager* instance_; |
70 // This list contains all live MessageQueues. | 70 // This list contains all live MessageQueues. |
71 std::vector<MessageQueue*> message_queues_ GUARDED_BY(crit_); | 71 std::vector<MessageQueue*> message_queues_ GUARDED_BY(crit_); |
72 | 72 |
73 // Acquire this with DebugNonReentrantCritScope. | |
74 CriticalSection crit_; | 73 CriticalSection crit_; |
75 bool locked_ GUARDED_BY(crit_); | 74 size_t processing_ GUARDED_BY(crit_); |
Taylor Brandstetter
2017/07/05 22:41:47
It would be nice if there was a comment describing
joachim
2017/07/05 23:03:11
Done.
| |
76 }; | 75 }; |
77 | 76 |
78 // Derive from this for specialized data | 77 // Derive from this for specialized data |
79 // App manages lifetime, except when messages are purged | 78 // App manages lifetime, except when messages are purged |
80 | 79 |
81 class MessageData { | 80 class MessageData { |
82 public: | 81 public: |
83 MessageData() {} | 82 MessageData() {} |
84 virtual ~MessageData() {} | 83 virtual ~MessageData() {} |
85 }; | 84 }; |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
351 SocketServer* const ss_; | 350 SocketServer* const ss_; |
352 // Used if SocketServer ownership lies with |this|. | 351 // Used if SocketServer ownership lies with |this|. |
353 std::unique_ptr<SocketServer> own_ss_; | 352 std::unique_ptr<SocketServer> own_ss_; |
354 | 353 |
355 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MessageQueue); | 354 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MessageQueue); |
356 }; | 355 }; |
357 | 356 |
358 } // namespace rtc | 357 } // namespace rtc |
359 | 358 |
360 #endif // WEBRTC_RTC_BASE_MESSAGEQUEUE_H_ | 359 #endif // WEBRTC_RTC_BASE_MESSAGEQUEUE_H_ |
OLD | NEW |