Skip to content

Monotonicity state moved into GenerationOptions instance making the state not globally shared#63

Merged
Seramis merged 2 commits into
ByteAether:mainfrom
Seramis:separate_states
Jul 23, 2026
Merged

Monotonicity state moved into GenerationOptions instance making the state not globally shared#63
Seramis merged 2 commits into
ByteAether:mainfrom
Seramis:separate_states

Conversation

@Seramis

@Seramis Seramis commented Jul 23, 2026

Copy link
Copy Markdown
Member

Description

The state necessary for monotonic ULID generation is now part of GenerationOptions instance instead of being globally shared. This fixes potential conflicts between different monotonic options being employed with all of them sharing the same state.
Documentation is updated accordingly.
Benchmarks were not affected.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Other (please specify):

Checklist

  • The PR is submitted to the correct branch (main).
  • My code follows the project's coding style. (.editorconfig)
  • I have commented my code, particularly in hard-to-understand areas and public interfaces.
  • I have added or updated tests for the changes I made.
  • All new and existing tests passed.
  • I have updated the documentation where applicable.

Additional Notes

Theoretically it is a breaking change as each GenerationOptions instance holds its own state. In practice, only better performance and more reasonably expected generated ULIDs should be the result.

@Seramis Seramis self-assigned this Jul 23, 2026
@Seramis Seramis added pkg:Ulid ByteAether.Ulid Nuget breaking-change Breaking Change labels Jul 23, 2026
@Seramis
Seramis merged commit d3f5c5f into ByteAether:main Jul 23, 2026
5 checks passed
@Seramis
Seramis deleted the separate_states branch July 23, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Breaking Change pkg:Ulid ByteAether.Ulid Nuget

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant