[
https://issues.apache.org/jira/browse/TINKERPOP-1490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15629373#comment-15629373
]
ASF GitHub Bot commented on TINKERPOP-1490:
-------------------------------------------
Github user okram commented on the issue:
https://github.com/apache/tinkerpop/pull/478
Wow. This is cool. Questions/comments:
1. Why do you ignore promise tests for `GroovyTranslator` and
`JavaTranslator`. Seems we would want that to work as well.
2. Why not have a `PromiseTest` in the process computer and process
standard suites? It would be good to know that computer tests (which wrap a
`CompletableFuture` too!) work as expected.
3. We should probably get Gremlin-Python set up on this branch before
merging into `tp32/`. I can write the code, I just don't know much about
promises nor how to do them in Python.
4. We should get @jorgebay to review to make sure Gremlin-JavaScript will
be able to use this model/naming convention so we don't diverge Gremlin-JS too
much from Gremlin-Java.
> Provider a Future based Traversal.async(Function<Traversal,V>) terminal step
> ----------------------------------------------------------------------------
>
> Key: TINKERPOP-1490
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1490
> Project: TinkerPop
> Issue Type: Improvement
> Components: language-variant, process
> Affects Versions: 3.2.2
> Reporter: Marko A. Rodriguez
>
> [~mbroecheler] had the idea of adding a {{Traversal.async()}} method. This is
> important for not only avoiding thread locking on a query in Gremlin, but
> also, it will allow single threaded language variants like Gremlin-JavaScript
> to use callbacks for processing query results.
> {code}
> Future<List<String>> result =
> g.V().out().values("name").async(Traversal::toList)
> {code}
> {code}
> Future<List<String>> result = g.V().out().name.async{it.toList()}
> {code}
> {code}
> g.V().out().values('name').async((err,names) => {
> // I don't know JavaScript, but ...
> return list(names);
> })
> {code}
> ...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)