parsl.executors.threads.ThreadPoolExecutor

class parsl.executors.threads.ThreadPoolExecutor(label='threads', max_threads=2, thread_name_prefix='', storage_access=None, working_dir=None, managed=True)[source]

A thread-based executor.

Parameters:
  • max_threads (int) – Number of threads. Default is 2.
  • thread_name_prefix (string) – Thread name prefix (only supported in python v3.6+).
  • storage_access (list of Scheme) – Specifications for accessing data this executor remotely. Multiple `Scheme`s are not yet supported.
  • managed (bool) – If True, parsl will control dynamic scaling of this executor, and be responsible. Otherwise, this is managed by the user.
__init__(label='threads', max_threads=2, thread_name_prefix='', storage_access=None, working_dir=None, managed=True)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([label, max_threads, …]) Initialize self.
scale_in(blocks) Scale in the number of active blocks by specified amount.
scale_out([workers]) Scales out the number of active workers by 1.
shutdown([block]) Shutdown the ThreadPool.
start() Start the executor.
submit(*args, **kwargs) Submits work to the thread pool.

Attributes

scaling_enabled Specify if scaling is enabled.