GitHub user spmallette opened a pull request:
https://github.com/apache/tinkerpop/pull/478
TINKERPOP-1490 Implemented promise API for Traversal
https://issues.apache.org/jira/browse/TINKERPOP-1490
Added two promise() methods that return `CompletableFuture` on `Traversal`.
Provided an override on `DefaultTraversal` for those methods because the
function that transforms the Traversal is executed in a different thread and
therefore requires Graph transaction management (or else we would orphan
transactions). Did not update gremlin-python with the promise API because it
seemed to beg discussion on the "right" way to do that (i.e. what library to
use to support promises?, just use futures from the core lib?, etc).
Had to move `commons-lang` to `gremlin-core` as a dependency (it was in
`gremlin-groovy`) so I that I could make use of the thread naming factory.
Doesn't really change anything as `gremlin-groovy` packaged with the console
and server anyway. LICENSE/NOTICE can remain unchanged as a result.
Works with `mvn clean install -DincludeNeo4j`.
VOTE +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1490
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/478.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #478
----
commit 9ad3042ff876a88af719a95b8e144f56b10c81c4
Author: Stephen Mallette <[email protected]>
Date: 2016-11-01T13:30:28Z
TINKERPOP-1490 Implemented promise API for Traversal
Added two promise() methods that return CompletableFuture on Traversal.
Provided an override on DefaultTraversal for those methods because the function
that transforms the Traversal is executed in a different thread and therefore
requires Graph transaction management (or else we would orphan transactions).
Did not update gremlin-python with the promise API because it seemed to beg
discussion on the "right" way to do that (i.e. what library to use to support
promises?, just use futures from the core lib?, etc).
----
---
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.
---