We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nextId
loadNext
next = querySegmentId()
querySegmentId
loadCurrent
tinyid/tinyid-base/src/main/java/com/xiaoju/uemc/tinyid/base/generator/impl/CachedIdGenerator.java
Line 36 in 49976d3
Line 69 in 49976d3
造成的结果: ①号段使用完了,③号段接着用,然后才可能用到②号段
The text was updated successfully, but these errors were encountered:
@duimba hhh
Sorry, something went wrong.
No branches or pull requests
nextId
多次后,会走进loadNext
, 假设next = querySegmentId()
里的querySegmentId
已经执行完了,等待赋值给nextnextId
直到用完,会走进loadCurrent
。然后因为上面的next还没赋值,所以会走进querySegmentId
tinyid/tinyid-base/src/main/java/com/xiaoju/uemc/tinyid/base/generator/impl/CachedIdGenerator.java
Line 36 in 49976d3
tinyid/tinyid-base/src/main/java/com/xiaoju/uemc/tinyid/base/generator/impl/CachedIdGenerator.java
Line 69 in 49976d3
造成的结果: ①号段使用完了,③号段接着用,然后才可能用到②号段
The text was updated successfully, but these errors were encountered: