diff options
author | 2017-07-17 22:40:11 +0200 | |
---|---|---|
committer | 2017-07-18 09:49:13 +0200 | |
commit | fe883872c78524b390ce85f29d49d1b99b993142 (patch) | |
tree | e424064b881724abf72ee0c3f1219f8d56aee8ec /src/main/java/com/google/devtools/build/lib/query2/AbstractBlazeQueryEnvironment.java | |
parent | 4da2f1613c5e71fec9898d3b17dc7eceab88f11f (diff) |
Make AbstractBlazeQueryEnv closable, shutdown SkyQEnv executor on close
Users of SkyQueryEnvironment ought to be able to shut down its executor
when they're finished with it.
RELNOTES: None.
PiperOrigin-RevId: 162262117
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/query2/AbstractBlazeQueryEnvironment.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/query2/AbstractBlazeQueryEnvironment.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/query2/AbstractBlazeQueryEnvironment.java b/src/main/java/com/google/devtools/build/lib/query2/AbstractBlazeQueryEnvironment.java index 55cb759a8d..2ab2758ee3 100644 --- a/src/main/java/com/google/devtools/build/lib/query2/AbstractBlazeQueryEnvironment.java +++ b/src/main/java/com/google/devtools/build/lib/query2/AbstractBlazeQueryEnvironment.java @@ -48,7 +48,8 @@ import java.util.logging.Logger; * {@link QueryEnvironment} that can evaluate queries to produce a result, and implements as much of * QueryEnvironment as possible while remaining mostly agnostic as to the objects being stored. */ -public abstract class AbstractBlazeQueryEnvironment<T> extends AbstractQueryEnvironment<T> { +public abstract class AbstractBlazeQueryEnvironment<T> extends AbstractQueryEnvironment<T> + implements AutoCloseable { protected ErrorSensingEventHandler eventHandler; protected final boolean keepGoing; protected final boolean strictScope; @@ -78,6 +79,9 @@ public abstract class AbstractBlazeQueryEnvironment<T> extends AbstractQueryEnvi this.extraFunctions = ImmutableList.copyOf(extraFunctions); } + @Override + public abstract void close(); + private static DependencyFilter constructDependencyFilter( Set<Setting> settings) { DependencyFilter specifiedFilter = |