Re: [go-nuts] A few go 2 suggestions

2017-10-11 Thread Scott Cotton
The difference is that go-routine level defers could be added further down the call stack and so could reference objects not visible in the calling "go ...()" scope. So it could simplify the messy task of cleaning up goroutines (implemented now by eg Context, tomb, etc) No need to identiy gorou

Re: [go-nuts] A few go 2 suggestions

2017-10-10 Thread Dan Kortschak
On Tue, 2017-10-10 at 06:13 -0700, Scott Cotton wrote: > 1. "defer go"   extend defers to work on goroutine exit with > mechanism just  > like defer, but if we say "defer go f()" > instead of "defer f()" then we run on goroutine exit.  Very big gains > for  > scaling here IMHO. How is this differ

[go-nuts] A few go 2 suggestions

2017-10-10 Thread Scott Cotton
Hi all, Been thinking about go 2 ideas, and I wanted to put forth some motivated but rough ideas. Here she goes: 1. "defer go" extend defers to work on goroutine exit with mechanism just like defer, but if we say "defer go f()" instead of "defer f()" then we run on goroutine exit. Very big