The current way in which the context manager is implemented along with download() in YoutubeDownloader, it makes it necessary to send parallel requests to download() in order to achieve parallelism, otherwise it runs in serial mode even with more number of workers (as the download() inherently waits for the executor job to finish before returning. See https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Future.exception)
We can have an option in download() to specify whether we want to wait or not
The current way in which the context manager is implemented along with download() in YoutubeDownloader, it makes it necessary to send parallel requests to download() in order to achieve parallelism, otherwise it runs in serial mode even with more number of workers (as the
download()
inherently waits for the executor job to finish before returning. See https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Future.exception)We can have an option in download() to specify whether we want to wait or not