Skip to content

[Feature] Thread-safe plugin implementation #495

@1tnguyen

Description

@1tnguyen

There is a need to use XACC's plugins in a thread-safe manner (multi-threading).

e.g., https://github.com/eclipse/xacc/pull/455/files

Using mutex to guard member functions may not be sufficient since service implementations may have internal states (e.g., set by initialize()).

Hence, to enable safe multi-threading of XACC, we should make all services cloneable, i.e., the service registry returns independent instances of the plugin when requested.

For example, one potential systematic way to do this is to make Identifiable (all services are derived from this) also cloneable.

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