'Slot' should be put before the compare expression to guarantee thread safe.

To guarantee thread safe, slot assignment should be put before compare expression.

Otherwise, it may cause overflow.