vine icon indicating copy to clipboard operation
vine copied to clipboard

Questions: Is there a way to gather results return by promises passed into a barrier?

Open xlqian opened this issue 8 years ago • 0 comments

I'd like to gather results returned by promises that are passed into a barrier, I imagined an interface like this:

        p1 = http.Request('http://a')
        p2 = http.Request('http://b')
        p3 = http.Request('http://c')
        requests = [p1, p2, p3]
        def gather_results(*res): # 
            pass  # all requests complete
        b = barrier(requests).then(gather_results)

Can this be achieved by using the current interface?

Thank you very much

xlqian avatar Mar 20 '17 13:03 xlqian