Hello Lionello,

"Christopher Wright" <dhase...@gmail.com> wrote in message

The point of a shared local variable is to pass it to another thread
or set of threads, which will then be able to mutate it without
trouble.

As before, how can an int (value type) on the stack ever be shared
with another thread? It would always have to be copied... Can you give
me an example please?


// without lookin up the details of threading

void main()
{
   int i;
   with(new Thread({i++;}))
   {
      Start();
      Wait();
   }
}


Reply via email to