Skip to content

Pass in last_id explicity #1

@Swoorup

Description

@Swoorup

Currently it seems the only reason for SequenceProperties to be mutable is that it needs to be aware of last_timestamp, and sequence when generating new ids.

If you need to have a multi-threaded sequence generator this would require to have an Arc<Mutex<SequenceProperties>> due to it.

Would suggest to make changes or expose a new api so that perhaps, you can pass the last_id seperately as immutable, so perhaps AtomicU64 could be used instead of the Mutex?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions