This is interesting. I spent a lot of time on google trying to figure out the answer to the exact same problem before posting basically the exact same query last night (Still waiting for moderator approval).
I would be very interested if anybody can explain a technique to run all of the calls in a template in parallel and collect results as they arrive. Very similar to futures. I don't want to have to write my own templating class! :) -- Michael On Tuesday, May 30, 2017 at 7:21:30 AM UTC-5, mhh...@gmail.com wrote: > > thanks for feedback. > > > If you need parallel execution of those function calls, I would run the > calls as part of my Go code and then pass the results to the template. > > This is not really //. > You are still waiting for the input to exist before you even start the > template processing. > > If you put the async call into the func call > *aka* func(){...blooocccckkk...} to func() > {async(...bloooccckkk)...wait..return}, > no win. > > I m looking for something that says, > > for every computations in template T, > stack them to L, > process every L.item in //, > for every Results of L.item(), > put back into the template. > > Which works if data is immutable (i have not find other reasons not to). > Which works only if there is some sort of scheduler which can tell, > operation X => depends none > operation Y => depends X > And thus resolve the tree in appropriate order while still using //ism. > > That being said, > I m better at writing template. > Any computer s/is/can be/ better and faster at those static transformation. > > So i m looking for a rendering engine smart enough to handle that for me. > > > > On Tuesday, May 30, 2017 at 12:04:54 PM UTC+2, Nathan Kerr wrote: >> >> I'm not aware of any templating languages that provide concurrent or >> parallel constructions. >> >> If you need parallel execution of those function calls, I would run the >> calls as part of my Go code and then pass the results to the template. >> >> On Tuesday, May 30, 2017 at 10:44:21 AM UTC+2, mhh...@gmail.com wrote: >>> >>> obviously not, >>> go func t.Exec... >>> go func t.Exec... >>> >>> but >>> >>> ` >>> {{slowcall}} >>> {{fastcall}} >>> {{slowcall}} >>> {{$y := CanNot//}} >>> ` >>> >>> ect >>> >>> On Tuesday, May 30, 2017 at 10:09:35 AM UTC+2, mhh...@gmail.com wrote: >>>> >>>> hi, >>>> >>>> wonder, if anyone, >>>> - tried to make an implementation of template that works in // ? >>>> - was it successful ? >>>> - useful for perf ? >>>> >>>> thanks >>>> >>> -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.