[go-nuts] Re: Puzzle: make a sync.Once fire more than once

2017-11-19 Thread Chris G
I've been tempted to reset the sync.Once inside the function, but I believe there's a subtle bug -- I'd be very interested to know if my understanding is incorrect. When Do() is called for the first time, it can aquire a mutex, and defers the unlocking until after the supplied function has comp

[go-nuts] Re: Recover considered harmful

2017-04-25 Thread Chris G
On Tuesday, April 25, 2017 at 7:52:25 PM UTC-7, Dave Cheney wrote: > > > Yes, and then crashes the program. In the scenario I described, with > thousands of other requests in flight that meet an abrubt end. That could > be incredibly costly, even if it's been planned for > > There are a host o

[go-nuts] Re: Recover considered harmful

2017-04-25 Thread Chris G
On Tuesday, April 25, 2017 at 6:07:33 PM UTC-7, Dave Cheney wrote: > > > > On Wednesday, 26 April 2017 10:57:58 UTC+10, Chris G wrote: >> >> I think those are all excellent things to do. They do not preclude the >> use of recovering from a panic to assi

[go-nuts] Re: Recover considered harmful

2017-04-25 Thread Chris G
I think those are all excellent things to do. They do not preclude the use of recovering from a panic to assist (emphasis on assist - it is certainly no silver bullet) in achieving fault tolerance. Assuming a web service that needs to be highly available, crashing the entire process due to one