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

Side by Side Diff: tools/gn/pool.h

Issue 2006923004: Add support for user defined "pool" to GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
(Empty)
1 // Copyright 2016 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 TOOLS_GN_POOL_H_
6 #define TOOLS_GN_POOL_H_
7
8 #include "tools/gn/item.h"
9
10 // Represents a named pool in the dependency graph.
11 //
12 // A pool is used to limit the parallelism of task invocation in the
13 // generated ninja build. Pools are referenced by toolchains.
14 class Pool : public Item {
15 public:
16 Pool(const Settings* settings, const Label& label);
17 ~Pool() override;
18
19 Pool(const Pool&) = delete;
20 Pool& operator=(const Pool&) = delete;
21
22 // Item implementation.
23 Pool* AsPool() override;
24 const Pool* AsPool() const override;
25
26 // The pool depth (number of task to run simultaneously).
27 int64_t depth() const { return depth_; }
28 void set_depth(int64_t depth) { depth_ = depth; }
29
30 private:
31 int64_t depth_ = 0;
32 };
33
34 #endif // TOOLS_GN_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698