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

Side by Side Diff: base/waitable_event.h

Issue 40195: An assert was being hit because WaitableEvent's dtor was calling CloseHandle ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/waitable_event_win.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 // 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 #ifndef BASE_WAITABLE_EVENT_H_ 5 #ifndef BASE_WAITABLE_EVENT_H_
6 #define BASE_WAITABLE_EVENT_H_ 6 #define BASE_WAITABLE_EVENT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // consumer must call the Reset method. If this parameter is false, then the 49 // consumer must call the Reset method. If this parameter is false, then the
50 // system automatically resets the event state to non-signaled after a single 50 // system automatically resets the event state to non-signaled after a single
51 // waiting thread has been released. 51 // waiting thread has been released.
52 WaitableEvent(bool manual_reset, bool initially_signaled); 52 WaitableEvent(bool manual_reset, bool initially_signaled);
53 53
54 #if defined(OS_WIN) 54 #if defined(OS_WIN)
55 // Create a WaitableEvent from an Event HANDLE which has already been 55 // Create a WaitableEvent from an Event HANDLE which has already been
56 // created. This objects takes ownership of the HANDLE and will close it when 56 // created. This objects takes ownership of the HANDLE and will close it when
57 // deleted. 57 // deleted.
58 explicit WaitableEvent(HANDLE event_handle); 58 explicit WaitableEvent(HANDLE event_handle);
59
60 // Releases ownership of the handle from this object.
61 HANDLE Release();
59 #endif 62 #endif
60 63
61 // WARNING: Destroying a WaitableEvent while threads are waiting on it is not 64 // WARNING: Destroying a WaitableEvent while threads are waiting on it is not
62 // supported. Doing so will cause crashes or other instability. 65 // supported. Doing so will cause crashes or other instability.
63 ~WaitableEvent(); 66 ~WaitableEvent();
64 67
65 // Put the event in the un-signaled state. 68 // Put the event in the un-signaled state.
66 void Reset(); 69 void Reset();
67 70
68 // Put the event in the signaled state. Causing any thread blocked on Wait 71 // Put the event in the signaled state. Causing any thread blocked on Wait
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 const bool manual_reset_; 150 const bool manual_reset_;
148 std::list<Waiter*> waiters_; 151 std::list<Waiter*> waiters_;
149 #endif 152 #endif
150 153
151 DISALLOW_COPY_AND_ASSIGN(WaitableEvent); 154 DISALLOW_COPY_AND_ASSIGN(WaitableEvent);
152 }; 155 };
153 156
154 } // namespace base 157 } // namespace base
155 158
156 #endif // BASE_WAITABLE_EVENT_H_ 159 #endif // BASE_WAITABLE_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | base/waitable_event_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698