If   func f (n int) []int {             is some fcn that requires CPU time 
T (large) to calculate its return value  

And I write :
func main() {
var s [ ] int; 
s1  := f(1)  ;  s1  := f(2) 
...
}

I get  results after CPU time  2 T
?? To obtain results in < 2T time,  can I write  s1  :=  go f(1)  ;  s1  := 
go f(2)

On Monday, May 6, 2019 at 7:11:00 AM UTC-4, Nitish Saboo wrote:
>
> Hi,
>
> I want a go method to run on multiple cores.The go method is returning an 
> object. Can we achieve this using goroutine ?
> How can I achieve this ?
>
> 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.

Reply via email to