// experiments indicate that even for the most CPU intensive applications with 200 or more threads MASK
// values in the order of 0xFFFF is appropriate
// IMPORTANT: This field can be updated by multiple threads. It follows that
// its values may *not* be incremented sequentially. However, we don't care
// about the actual value of the field except that from time to time the
// expression (invocationCounter++ & mask) == mask) should be true.
// if less than thresholdForMaskIncrease milliseconds elapse between invocations of updateMaskIfNecessary()
// method, then the mask should be increased
// if more than thresholdForMaskDecrease milliseconds elapse between invocations of updateMaskIfNecessary() method,
// then the mask should be decreased
// update the mask so as to execute change detection code about once every 100 to 8000 milliseconds.