Additional Remark Removing the sleep(0.1) in the dowork() function results in an infinite loop. Why is that and what can be done?
@everywhere function dowork(res,nZs)
global toStop
global steps
while !toStop
for j=1:steps
localpart(res)[1]+=rand()
localpart(nZs)[1]+=1
end
#sleep(0.1);
end
end
