On Wed, Jul 20, 2022 at 01:00:59PM +0300, Konstantin Khomoutov wrote:
> > for i=0;i<10;i++ { go func () { /* const c=i OR var v=i */
> > fmt.Println("f:beg i=",i) // here c or v instead
> > // action
> > fmt.Println("f:end i=",i) // here c or v instead
> > }}
[...]
> - Make your anonymous
On Tue, Jul 19, 2022 at 08:28:02AM -0700, 'andreas graeper' via golang-nuts
wrote:
> for i=0;i<10;i++ { go func () { /* const c=i OR var v=i */
> fmt.Println("f:beg i=",i) // here c or v instead
> // action
> fmt.Println("f:end i=",i) // here c or v instead
> }}
> when this routines get inte
hi,
for i=0;i<10;i++ { go func () { /* const c=i OR var v=i */
fmt.Println("f:beg i=",i) // here c or v instead
// action
fmt.Println("f:end i=",i) // here c or v instead
}}
when this routines get interrupted then beg-i and end-i differ
now i want at the beginning of the routine a const copy