Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1490

Provider a Future based Traversal.async(Function<Traversal,V>) terminal step

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Done
    • 3.2.2
    • 3.2.4
    • process
    • None

    Description

      Matthias Broecheler 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.

      Future<List<String>> result = g.V().out().values("name").async(Traversal::toList)
      
      Future<List<String>> result = g.V().out().name.async{it.toList()}
      
      g.V().out().values('name').async((err,names) => {
        // I don't know JavaScript, but ...
        return list(names);
      }) 
      

      ...

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            spmallette Stephen Mallette
            okram Marko A. Rodriguez
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment