1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CCCompletionEvent_h
6 #define CCCompletionEvent_h
8 #include "base/synchronization/waitable_event.h"
12 // Used for making blocking calls from one thread to another. Use only when
13 // absolutely certain that doing-so will not lead to a deadlock.
15 // It is safe to destroy this object as soon as wait() returns.
16 class CCCompletionEvent
{
19 : m_event(false /* manual_reset */, false /* initially_signaled */)
52 base::WaitableEvent m_event
;
54 // Used to assert that wait() and signal() are each called exactly once.