I do not like this change since it causes many re-reads of the state field which cannot be optimized by the JVM.  We've seen in other tests that the performance of reading fields is measurably worse than that of local variables (which can be read with weaker ordering rules by the JVM); in the task case we should be especially aware of this because we could be running thousands or even millions of tasks in a transaction.