Github user pingtimeout commented on the pull request:
https://github.com/apache/incubator-tinkerpop/pull/146#issuecomment-157740699
Thanks for the review. Indeed I forgot the async version of `close()`.
We could use `CompletableFuture::thenRun(Runnable, Executor)` with the
common Fork/Join pool to shut down the executor but it may take a while if that
pool is overwhelmed...
I am trying another implementation where `executor().shutdown()` is called
[immediately
after](https://github.com/apache/incubator-tinkerpop/blob/0feaa8b47de2797e177310cd1ea3bf38d7230420/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java#L619)
the call to `.submit()` returns. According to the Javadoc of
`ExecutorService`, it should work:
Initiates an orderly shutdown in which previously submitted tasks are
executed, but no new tasks will be accepted.
If the build succeeds, I will replace my previous commit with that new
change.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---