Skip to content

Thread safety #1700

@brenttheisen

Description

@brenttheisen

It appears as though every method defined in this gem is intended to be called as a class method, not an instance method. Of course these class methods often modify class variables which makes it impossible to use this gem in a thread safe way without locking threads.

Was the decision made to sacrifice thread safety in order to call methods easily on classes? Were there any other reasons why thread safety wasn't considered?

I'd like to use this gem to generate deterministic fake data for a preproduction API that runs in Puma (threads instead of processes). Was hoping there was a way to use it without needing to lock.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ↩ Needs RevisitingThis issue or PR has been brought back and needs to be worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions