baidu / uid-generator

UniqueID generator
Apache License 2.0
5.46k stars 1.55k forks source link

因为disruptor的RingBuffer是会有重复消费问题的,请问uid-generator使用了RingBuffer是如何解决重复消费问题的 #49

Closed alsmn closed 3 years ago

alsmn commented 4 years ago

因为disruptor的RingBuffer是会有重复消费问题的,请问uid-generator使用了RingBuffer是如何解决重复消费问题的,谢谢

songlea commented 3 years ago

RingBuffer类中的PaddedAtomicLong[] flags