I was going through the specification of Chapel and was reading on Task Level Parallelism, in particular the synchronization variables (sync and single) and the logical state of them and how they go about. I came across this example given in the specification on this Link
var count$: sync int=0;
cobegin{
count$+=1
count$+=1
count$+=1
}
On running the above code, I get an error but the specification does not talk about it and expects the program to run properly. Why do I get this behaviour?