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

Side by Side Diff: base/barrier_closure.h

Issue 22859056: Add a BarrierClosure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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/barrier_closure.cc » ('j') | base/barrier_closure.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 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.
4
5 #ifndef BASE_BARRIER_CLOSURE_
awong 2013/08/22 21:28:33 BASE_BARRIER_CLOSURE_ -> BASE_BARRIER_CLOSURE_H_
groby-ooo-7-16 2013/08/22 21:59:45 Done.
6 #define BASE_BARRIER_CLOSURE_
7
8 #include "base/base_export.h"
9 #include "base/callback_forward.h"
10
11 namespace base {
12
13 // BarrierClosure executes |done_closure| after it has been invoked
14 // |num_closures| times.
15 //
16 // If |num_closures| is 0, |done_closure| is executed immediately.
17 //
18 // BarrierClosure is thread-safe - the count of remaining closures is
19 // maintained as a base::AtomicRefCount.
awong 2013/08/22 21:28:33 This should note the threading assumptions about w
groby-ooo-7-16 2013/08/22 21:59:45 Done.
20 BASE_EXPORT base::Closure BarrierClosure(int num_closures,
21 const base::Closure& done_closure);
22
23 } // base
awong 2013/08/22 21:28:33 } // namesapce base #endif // BASE_BARRIER_CLOS
groby-ooo-7-16 2013/08/22 21:59:45 Done.
24 #endif // BASE_BARRIER_CLOSURE_
OLDNEW
« no previous file with comments | « no previous file | base/barrier_closure.cc » ('j') | base/barrier_closure.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698