qml.concurrency.executors.base.ExecBackendConfig¶
- class ExecBackendConfig(submit_fn=None, map_fn=None, starmap_fn=None, shutdown_fn=None, submit_unpack=None, map_unpack=None, blocking=None)[source]¶
Bases:
objectExecutor backend configuration data-class.
To allow for differences in each executor backend implementation, this class dynamically defines overloads to the main API functions. For explicitly-defined executors, this class is optional, and is provided for convenience with hierarchical inheritance class structures, where subtle differences are best resolved dynamically, rather than with API modifications. All initial values default to
None.- Parameters:
submit_fn (str, None) – The backend function that best matches the
submitAPI call.map_fn (str) – The backend function that best matches the
mapAPI call.starmap_fn (str, None) – The backend function that best matches the
starmapAPI call.shutdown_fn (str, None) – The backend function that best matches the
shutdownAPI call.submit_unpack (bool, None) – Whether the arguments to
submitare to be unpacked (*args) or directly passed (args) tosubmit_fn.map_unpack (bool) – Whether the arguments to
mapare to be unpacked (*args) or directly passed (args) tomap_unpack.blocking (bool, None) – Whether the return values from
submit,mapandstarmapare blocking (synchronous) or non-blocking (asynchronous).
Attributes