Here is recursion. I d'ont know when its end. On Friday, November 30, 2018 at 12:04:42 PM UTC-8, Burak Serdar wrote: > > On Fri, Nov 30, 2018 at 12:44 PM Alex Dvoretskiy > <advore...@gmail.com <javascript:>> wrote: > > > > Hi, > > > > How should I modify my code if I want to run three recursive functions > in parallel? > > > > go inOrderTr(root) > > go preOrderTr(root) > > go postOrderTr(root) > > Those three are mutually independent, and the tree is read-only, so > you don't need any synchronization between the three. You might use a > sync.WaitGroup to wait for all of them to end. > > > > https://play.golang.org/p/n-QLR7V0H49 > > > > -- > > 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...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/d/optout. >
-- 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.