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 `const c int = i`
but its not allowed and `var v int = i` does not work, too.

does an instance of a go-routine has no own stack-frame like a normal 
function (c i.e) and therein local/private variables ? 

thanks in advance

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/13706191-8a55-44fe-bbf8-e9db5799dbaan%40googlegroups.com.

Reply via email to