Hello,
I naively thought that the following code would print a few zeros, which would then follow by all ones:
my(q=0); parfor(i=1,10^6, print(q); 0, R, q=1)
but it constantly prints zeros. So, the value of q is not shared between threads.
What is the right way to create a shared variable (with pthreads if that matters)?
Regards,
Max