in s3transfer/processpool.py [0:0]
def __init__(self, client_kwargs=None, config=None):
"""Downloads S3 objects using process pools
:type client_kwargs: dict
:param client_kwargs: The keyword arguments to provide when
instantiating S3 clients. The arguments must match the keyword
arguments provided to the
`botocore.session.Session.create_client()` method.
:type config: ProcessTransferConfig
:param config: Configuration for the downloader
"""
if client_kwargs is None:
client_kwargs = {}
self._client_factory = ClientFactory(client_kwargs)
self._transfer_config = config
if config is None:
self._transfer_config = ProcessTransferConfig()
self._download_request_queue = multiprocessing.Queue(1000)
self._worker_queue = multiprocessing.Queue(1000)
self._osutil = OSUtils()
self._started = False
self._start_lock = threading.Lock()
# These below are initialized in the start() method
self._manager = None
self._transfer_monitor = None
self._submitter = None
self._workers = []