>> This seems like a compiler bug. It's declared: >> uint maxThreads=1; >> >> Am I missing something? > > Could it be because you run the code from constructor? > Maybe it is not yet set at that point, just guessing? Okay, must be compiler bug, just checked and it is not touched anywhere except the initialization.