Skip to content

Thread safe version of lazy_init #5

@jrgfogh

Description

@jrgfogh

lazy_init is not thread safe. Writing a thread safe version is trivial using std::call_once, but std::once_flag is neither movable nor copyable. It is possible to work around this, but moving an object which is used across threads probably doesn't make sense anyway.

There should be a thread safe alternative as a separate class.

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