Re: [go-nuts] Re: Check Channel is active or not while Writing as writer Go routine

2024-11-02 Thread Robert Engels
Nice article. I think it over complicates the situation though and may lead to confusion. Some situations lead naturally to a go routine per request (web server processing) - with a fixed lifetime - others lead to a fixed count of go routines (like services) - permanence. Using ephemeral channels i

Re: [go-nuts] Re: Check Channel is active or not while Writing as writer Go routine

2024-11-02 Thread tapi...@gmail.com
On Thursday, October 31, 2024 at 10:24:23 PM UTC+8 Nico Braun wrote: I think not closing the channel has the side effect, of making it easier to leak goroutines. If your memory is growing, its likely that there is still a receiver who didn't realize there is nothing more to receive. That is one

Re: [go-nuts] Re: Check Channel is active or not while Writing as writer Go routine

2024-10-31 Thread Nico Braun
I think not closing the channel has the side effect, of making it easier to leak goroutines. If your memory is growing, its likely that there is still a receiver who didn't realize there is nothing more to receive. That is one thing closing a channel can do and oftentimes does, i.e. when ranging

Re: [go-nuts] Re: Check Channel is active or not while Writing as writer Go routine

2024-10-31 Thread Ian Lance Taylor
On Thu, Oct 31, 2024 at 5:29 AM 'Aniket Pandey' via golang-nuts wrote: > > while performing trial and error i just implemented an idea of not closing > the channel in my go-lang code , due to which my server memory was going > high , sharing it just FYI I don't know what happened in your progr