I\'ve heard that i++ isn\'t a thread-safe statement since in assembly it reduces down to storing the original value as a temp somewhere, incrementing it, and then replacing
Throw i into thread local storage; it isn't atomic, but it then doesn't matter.