[ https://issues.apache.org/jira/browse/TINKERPOP-1490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15670725#comment-15670725 ]
ASF GitHub Bot commented on TINKERPOP-1490: ------------------------------------------- Github user aboudreault commented on the issue: https://github.com/apache/tinkerpop/pull/478 @davebshow @aholmberg (PYTHON) I must agree that my initial thought is that we should try to avoid the coupling with tornado. However, since tornado is already used internally, it might get better performance since it is optimzed and non thread-safe for the loop. If I understand correctly, a custom RemoteConnection will need to return its own future type. Isn't a bit confusing for the user that he will get different future types? I was seeing the RemoteConnection as the transport layer and that it was transparently pluggable. With this change, we see that it has an impact on the API of the query response. IMO, for that reason, we might want to consider a specialized handling of the future returned by the traversal query. > 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)