Cadair / parfive

An asyncio based parallel file downloader for Python 3.8+
https://parfive.readthedocs.io/
MIT License
51 stars 24 forks source link

Document download call blocking and non-blocking calls #120

Open dreamflasher opened 1 year ago

dreamflasher commented 1 year ago

From the documentation it's not clear what the current behaviour of dl.download() is. But either way it would be great if you would add an option to toggle the behaviour: blocking or non-blocking.

dreamflasher commented 1 year ago

Apparently this does exist, but is undocumented:

blocking: https://github.com/Cadair/parfive/blob/54d81fad85d668f71b2a35823ba57008b66d944b/parfive/downloader.py#L315 Downloader.download()

non-blocking: https://github.com/Cadair/parfive/blob/54d81fad85d668f71b2a35823ba57008b66d944b/parfive/downloader.py#L257 Downloader.run_download()

I suggest do add this to the documentation.