Re: [go-nuts] Re: Is there any ways to kill goroutine immediately ?

2018-01-11 Thread Ian Lance Taylor
On Thu, Jan 11, 2018 at 9:02 AM, wrote: > A `return` should kill it. Or runtime.Goexit (https://golang.org/pkg/runtime/#Goexit). Ian > On Thursday, 11 January 2018 15:50:24 UTC, Iman Tumorang wrote: >> >> I'm using goroutine with 2 concurrent jobs. >> >> And

[go-nuts] Re: Is there any ways to kill goroutine immediately ?

2018-01-11 Thread gary . willoughby
A `return` should kill it. On Thursday, 11 January 2018 15:50:24 UTC, Iman Tumorang wrote: > > I'm using goroutine with 2 concurrent jobs. > > And I've using context with both of the goroutine. > > I use > context.WithTimeout > > > func (u *feedUsecase) fetchDataWithContext(ctx