Yes! This is perfect!
On Friday, November 30, 2018 at 2:52:57 PM UTC-8, Justin Israel wrote:
>
>
>
> On Sat, Dec 1, 2018, 10:43 AM Alex Dvoretskiy > wrote:
>
>> Here is recursion. I d'ont know when its end.
>>
>
> Do you mean that you want to wait for all 3 goroutines to complete?
>
> var wg syn
On Sat, Dec 1, 2018, 10:43 AM Alex Dvoretskiy
wrote:
> Here is recursion. I d'ont know when its end.
>
Do you mean that you want to wait for all 3 goroutines to complete?
var wg sync.WaitGroup
wg.Add(3)
go func() {
inOrderTr(root)
wg.Done()
}()
go func() {
preOrderTr(root)
wg.
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
> > wrote:
> >
> > Hi,
> >
> > How should I modify my code if I want to run three recursive functions
> in parallel?
> >
On Fri, Nov 30, 2018 at 12:44 PM Alex Dvoretskiy
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 do
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)
https://play.golang.org/p/n-QLR7V0H49
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsub