WIP: Generalize sequence incrementing and only increment sequences when time doesn't move forwards #136
No reviewers
Labels
No labels
breaking
bug
dependencies
good first issue
help wanted
unstable
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-uuid-rs/uuid!136
Loading…
Reference in a new issue
No description provided.
Delete branch "106-sequence-incr"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is a big backwards-incompatible change, and WORK-IN-PROGRESS.
UuidV1Contextwas renamed toDefaultUuidV1ContextUuidV1Contextis added. This trait has a method for getting a u16 sequence number given the current time.DefaultUuidV1Contextnow has a Mutex in it for storing and updating the last time that a sequence number was requested. This means thatDefaultUuidV1Contextis only available when thestdfeature is enabled.Is there any way we can avoid the context? I'm sure it probably slows down new_v1 a lot (though I plan on adding some benchmarks for this).
Also, while #106 proposed changing
UuidV1Contextto a trait, I think this might be unnecessary churn. A trait is a good idea, but it should probably be called something else so thatUuidV1Contextcan remain backwards compatible.I think we need to think this one through a little more, there should be an option available when a user is in
no_stdmode.@kinggoesgaming I have some other discussion points back on the ticket at #106.
superseded by #137
Pull request closed