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

2017-10-10 Thread Michael Jones
(part 2) ...sorry, I should have said: "f() will complete its evaluation before g() is runnable, it g() runs at all." "g() will become runnable before evaluation of f() is started" "f() will evaluate completely and then g() will evaluate completely before func() returns" On Tue, Oct 10, 2017 a

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

2017-10-10 Thread Michael Jones
First... go func() { f() go g() }() is tremendously different than: go func() { go g() f() }() and neither is equivalent to : go func() { f() g() } () ...and on the order of evaluation and visibility and weak memory coher

Re: [go-nuts] "defer go"

2017-10-10 Thread Bakul Shah
On Tue, 10 Oct 2017 09:27:52 -0400 Shawn Milochik wrote: Shawn Milochik writes: > > On Tue, Oct 10, 2017 at 9:13 AM, Scott Cotton wrote: > > > Hi all, > > > > 1. "defer go" extend defers to work on goroutine exit with mechanism > > just like defer, but if we say "defer go f()" > > instead of

Re: [go-nuts] "defer go"

2017-10-10 Thread Ian Lance Taylor
On Tue, Oct 10, 2017 at 6:27 AM, Shawn Milochik wrote: > On Tue, Oct 10, 2017 at 9:13 AM, Scott Cotton wrote: >> >> Hi all, >> >> 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 gorout

Re: [go-nuts] "defer go"

2017-10-10 Thread Ian Davis
On Tue, 10 Oct 2017, at 02:27 PM, Shawn Milochik wrote: > On Tue, Oct 10, 2017 at 9:13 AM, Scott Cotton labs.com> wrote:>> Hi all, >> >> 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