Skip to content
New issue

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

Generating Time Based UUIDs #13668

Merged
merged 3 commits into from
Apr 11, 2023
Merged

Generating Time Based UUIDs #13668

merged 3 commits into from
Apr 11, 2023

Conversation

Alexandru-Borza
Copy link
Contributor

No description provided.

CountDownLatch endLatch = new CountDownLatch(threadCount);

for (long i = 0; i < threadCount; i++) {
final long threadId = i;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this needs to be final. In Java 8 it's effectively final which I think means we can omit the final keyword here.


int threadCount = 128;
int iterationCount = 100_000;
ConcurrentMap<UUID, Long> uuidMap = new ConcurrentHashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this LHS just be Map<UUID, Long>

@ashleyfrieze ashleyfrieze merged commit c06c8db into eugenp:master Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants