-
I am integrating httpx in a multi-processing environment running Celery workers. I was wondering the following: if I pass -threads 50 to httpx but the targets list contains a single URL, will it still spawn 50 co-routines ? Or is it adjusted in function of the target length ? Trying to optimize the number of threads based on the target list length basically. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @ocervell, I BELIEVE it will not spin up coroutines unless it has other targets to look for. But instead of giving you an answer built on hopes and prayers, I'm going to ask an actual expert: @ehsandeep. |
Beta Was this translation helpful? Give feedback.
-
apologies for the late answer, the internal engine blocks on channel, so go routines with their own stack are spawned only when items are available, there are no idle threads. |
Beta Was this translation helpful? Give feedback.
apologies for the late answer, the internal engine blocks on channel, so go routines with their own stack are spawned only when items are available, there are no idle threads.