Github user spmallette commented on the pull request:
https://github.com/apache/incubator-tinkerpop/pull/146#issuecomment-157750708
Ok - so just to be clear, for your cases 2 and 3, the executor that you
called `shutdown()` on might still be active when the `CompletableFuture`
finishes to say the "cluster is closed"? In other words, all resources haven't
been really shutdown at the point the future returns because the executor might
still be working on that since you aren't blocking. Is that a problem or am I
not thinking of that right?
actually, I'm trying to think of what weird things might happen if there is
something long running in the executor and then we call closeAsync()? If there
was such a situation, that will schedule a job to close the transport which
might somehow be in use by that long run job. It seems like it is wrong to try
to use the executor in shutdown. Maybe it would be better if it was just a
standalone "shutdown" thread? in that way it could call `executor.shutdown()`
and `awaitTermination()` and then call `factory.shutdown()` and then complete
the future. wdyt? am i thinking too much?
---
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.
---