From 6b37ce0cc055fc3101e7f59e07a6517ebf6e599b Mon Sep 17 00:00:00 2001 From: thomasw21 <24695242+thomasw21@users.noreply.github.com> Date: Thu, 16 Mar 2023 12:30:00 +0100 Subject: [PATCH] Document how to tune the number of threads one can use in hf_transfer --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 6aad899..7cef5cf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,6 +14,7 @@ use tokio::time::sleep; /// parallel_failures: Number of maximum failures of different chunks in parallel (cannot exceed max_files) /// max_retries: Number of maximum attempts per chunk. (Retries are exponentially backed off + jitter) +/// number of threads can be tuned by environment variable `TOKIO_WORKER_THREADS` as documented in https://docs.rs/tokio/latest/tokio/runtime/struct.Builder.html#method.worker_threads #[pyfunction] #[pyo3(signature = (url, filename, max_files, chunk_size, parallel_failures=0, max_retries=0))] fn download(