Skip to content

Suggestion: Singleton Pattern #6

@vkichline

Description

@vkichline

There are a number of Singleton classes in Core2ez, but they don't follow the Singleton Pattern, designed for the kind of safety a library to be used by non-experts can benefit from:
See: Singleton Pattern or another

While the terms "sloppy" and "naïve" are used to describe the simpler version in the first reference, these are simply synonyms for "single threaded" and are probably completely safe to use in Core2ez; I don't see multi-threading being given special consideration anywhere (in Arduino code in general.)

Using the Pattern is safer (has been industrially tested) and makes the intention of the code clearer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions