On Tue, 10 Oct 2017, at 02:27 PM, Shawn Milochik wrote:
> On Tue, Oct 10, 2017 at 9:13 AM, Scott Cotton <wsc@iri-
> 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 run on goroutine exit.  Very big gains
>> for scaling here IMHO.>> 
> 
> You can already "defer go": defer func() { go otherFunc() }()
> 
> https://play.golang.org/p/DkNoFXLACn

Interestingly I read the suggestion the other way round:

go func() { defer otherfunc() }()

Either way, this seems like it's already well supported :)

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to