Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: webrtc/base/event.h

Issue 2694723004: Making AsyncInvoker destructor thread-safe. (Closed)
Patch Set: Merge with master Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/asyncinvoker-inl.h ('k') | webrtc/base/thread_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 #ifndef WEBRTC_BASE_EVENT_H__ 11 #ifndef WEBRTC_BASE_EVENT_H__
12 #define WEBRTC_BASE_EVENT_H__ 12 #define WEBRTC_BASE_EVENT_H__
13 13
14 #include "webrtc/base/constructormagic.h"
14 #if defined(WEBRTC_WIN) 15 #if defined(WEBRTC_WIN)
15 #include "webrtc/base/win32.h" // NOLINT: consider this a system header. 16 #include "webrtc/base/win32.h" // NOLINT: consider this a system header.
16 #elif defined(WEBRTC_POSIX) 17 #elif defined(WEBRTC_POSIX)
17 #include <pthread.h> 18 #include <pthread.h>
18 #else 19 #else
19 #error "Must define either WEBRTC_WIN or WEBRTC_POSIX." 20 #error "Must define either WEBRTC_WIN or WEBRTC_POSIX."
20 #endif 21 #endif
21 22
22 namespace rtc { 23 namespace rtc {
23 24
(...skipping 13 matching lines...) Expand all
37 38
38 private: 39 private:
39 #if defined(WEBRTC_WIN) 40 #if defined(WEBRTC_WIN)
40 HANDLE event_handle_; 41 HANDLE event_handle_;
41 #elif defined(WEBRTC_POSIX) 42 #elif defined(WEBRTC_POSIX)
42 pthread_mutex_t event_mutex_; 43 pthread_mutex_t event_mutex_;
43 pthread_cond_t event_cond_; 44 pthread_cond_t event_cond_;
44 const bool is_manual_reset_; 45 const bool is_manual_reset_;
45 bool event_status_; 46 bool event_status_;
46 #endif 47 #endif
48
49 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(Event);
47 }; 50 };
48 51
49 } // namespace rtc 52 } // namespace rtc
50 53
51 #endif // WEBRTC_BASE_EVENT_H__ 54 #endif // WEBRTC_BASE_EVENT_H__
OLDNEW
« no previous file with comments | « webrtc/base/asyncinvoker-inl.h ('k') | webrtc/base/thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698