You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Just for future references, the pull request above makes NLOptimizer cloneable. Similarly, this pull request for QCOR (https://github.com/ORNL-QCI/qcor/pull/157) makes VQEObjective cloneable.
And I agree with you that we'll need to somehow make all services cloneable.
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 byinitialize()
).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.The text was updated successfully, but these errors were encountered: