aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/cpp/cc_configure.bzl
diff options
context:
space:
mode:
authorGravatar Nathan Harmata <nharmata@google.com>2016-09-28 20:20:48 +0000
committerGravatar Yun Peng <pcloudy@google.com>2016-09-29 09:03:54 +0000
commit71616b1549daee1eb5ec822c7bd1c744d8c58479 (patch)
treee14dccec7d5d009c9c6d90fa84606bf92fd620f4 /tools/cpp/cc_configure.bzl
parent5825a418ef66572f3073ff62d11d255baa5b975c (diff)
Make AbstractBlazeQueryEnvironment no longer implement AutoCloseable. Instead have SkyQueryEnvironment#evaluateQuery be responsible for handling cleanup of its internal ForkJoinPool.
In addition to being a more sensible way of organizing the code (imo, it makes sense for SkyQueryEnvironment to clean up after itself), this fixes several issues: (i) If query evaluation is interrupted, the AbstractBlazeQueryEnvironment#close call at the end of the try-with-resources statement in QueryCommand would be blocking and non-urgent. N.B. This was not an issue with the current ForkJoinPool usage, but was an issue with the old ThreadPoolExecutor usage. (ii) Because of how the code in QueryCommand was structured, OutputFormatterCallback#close would happen _before_ the AbstractBlazeQueryEnvironment#close call. If query evaluation is interrupted, threads executing query tasks may be invoking the callback after the callback had been shut down! -- MOS_MIGRATED_REVID=134573395
Diffstat (limited to 'tools/cpp/cc_configure.bzl')
0 files changed, 0 insertions, 0 deletions