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

Side by Side Diff: base/barrier_closure.h

Issue 23484036: Add newlines to the end of files where they were missing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BARRIER_CLOSURE_H_ 5 #ifndef BASE_BARRIER_CLOSURE_H_
6 #define BASE_BARRIER_CLOSURE_H_ 6 #define BASE_BARRIER_CLOSURE_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 10
11 namespace base { 11 namespace base {
12 12
13 // BarrierClosure executes |done_closure| after it has been invoked 13 // BarrierClosure executes |done_closure| after it has been invoked
14 // |num_closures| times. 14 // |num_closures| times.
15 // 15 //
16 // If |num_closures| is 0, |done_closure| is executed immediately. 16 // If |num_closures| is 0, |done_closure| is executed immediately.
17 // 17 //
18 // BarrierClosure is thread-safe - the count of remaining closures is 18 // BarrierClosure is thread-safe - the count of remaining closures is
19 // maintained as a base::AtomicRefCount. |done_closure| will be run on 19 // maintained as a base::AtomicRefCount. |done_closure| will be run on
20 // the thread that calls the final Run() on the returned closures. 20 // the thread that calls the final Run() on the returned closures.
21 // 21 //
22 // |done_closure| is also Reset() on the final calling thread but due to the 22 // |done_closure| is also Reset() on the final calling thread but due to the
23 // refcounted nature of callbacks, it is hard to know what thread resources 23 // refcounted nature of callbacks, it is hard to know what thread resources
24 // will be released on. 24 // will be released on.
25 BASE_EXPORT base::Closure BarrierClosure(int num_closures, 25 BASE_EXPORT base::Closure BarrierClosure(int num_closures,
26 const base::Closure& done_closure); 26 const base::Closure& done_closure);
27 27
28 } // namespace base 28 } // namespace base
29 29
30 #endif // BASE_BARRIER_CLOSURE_H_ 30 #endif // BASE_BARRIER_CLOSURE_H_
OLDNEW
« no previous file with comments | « no previous file | base/barrier_closure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698