OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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 TOOLS_GN_SCHEDULER_H_ | 5 #ifndef TOOLS_GN_SCHEDULER_H_ |
6 #define TOOLS_GN_SCHEDULER_H_ | 6 #define TOOLS_GN_SCHEDULER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/atomic_ref_count.h" | 10 #include "base/atomic_ref_count.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 class Scheduler { | 26 class Scheduler { |
27 public: | 27 public: |
28 Scheduler(); | 28 Scheduler(); |
29 ~Scheduler(); | 29 ~Scheduler(); |
30 | 30 |
31 bool Run(); | 31 bool Run(); |
32 | 32 |
33 scoped_refptr<base::SingleThreadTaskRunner> task_runner() { | 33 scoped_refptr<base::SingleThreadTaskRunner> task_runner() { |
34 return main_loop_.task_runner(); | 34 return main_loop_.task_runner(); |
35 } | 35 } |
| 36 base::SequencedWorkerPool* pool() { return pool_.get(); } |
36 | 37 |
37 InputFileManager* input_file_manager() { return input_file_manager_.get(); } | 38 InputFileManager* input_file_manager() { return input_file_manager_.get(); } |
38 | 39 |
39 bool verbose_logging() const { return verbose_logging_; } | 40 bool verbose_logging() const { return verbose_logging_; } |
40 void set_verbose_logging(bool v) { verbose_logging_ = v; } | 41 void set_verbose_logging(bool v) { verbose_logging_ = v; } |
41 | 42 |
42 // TODO(brettw) data race on this access (benign?). | 43 // TODO(brettw) data race on this access (benign?). |
43 bool is_failed() const { return is_failed_; } | 44 bool is_failed() const { return is_failed_; } |
44 | 45 |
45 void Log(const std::string& verb, const std::string& msg); | 46 void Log(const std::string& verb, const std::string& msg); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 std::vector<SourceFile> written_files_; | 126 std::vector<SourceFile> written_files_; |
126 std::vector<const Target*> write_runtime_deps_targets_; | 127 std::vector<const Target*> write_runtime_deps_targets_; |
127 std::multimap<SourceFile, const Target*> unknown_generated_inputs_; | 128 std::multimap<SourceFile, const Target*> unknown_generated_inputs_; |
128 | 129 |
129 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 130 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
130 }; | 131 }; |
131 | 132 |
132 extern Scheduler* g_scheduler; | 133 extern Scheduler* g_scheduler; |
133 | 134 |
134 #endif // TOOLS_GN_SCHEDULER_H_ | 135 #endif // TOOLS_GN_SCHEDULER_H_ |
OLD | NEW |