Make RangeIntGenerator Thread Safe

Make RangeIntGenerator Thread Safe, before it would give some numbers multiple times, before.