OLD | NEW |
---|---|
(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_H_ | |
6 #define BASE_BARRIER_CLOSURE_H_ | |
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. |done_closure| will be run on | |
20 // the thread that calls the final Run() on the returned closures. It will | |
21 // be Reset() after that. | |
awong
2013/08/22 22:05:16
I would say
|done_closure| is also Reset() on the
groby-ooo-7-16
2013/08/24 00:27:25
Done.
| |
22 BASE_EXPORT base::Closure BarrierClosure(int num_closures, | |
23 const base::Closure& done_closure); | |
24 | |
25 } // namespace base | |
26 | |
27 #endif // BASE_BARRIER_CLOSURE_H_ | |
OLD | NEW |