Yes, but I would argue that a simple approach like multi-option clearing all 
easy handles when it is cleared has its own merits to be considered.
This was the main reason why the iterating over easy handles was requested, and 
I didn't find any other useful use cases even in the 2016 request that were 
useful to many people.

If there were such cases, then I think that the requests for easy handle 
iterating API would pop up much more frequently than just once in seven years.

The iterating API is a good thing for all the other use cases, but using it for 
freeing easy handles when multi handle is cleaned up as the most frequently 
used and needed use case,
seems like an overkill to me.

I am not against such API in general if someone wants to use for something else 
besides freeing easy handles.
But for freeing easy handles when multi handle is cleaned up, I think we should 
provide an easy and convenient way to do that, maybe in addition to the 
iterating API.

If freeing easy handles is the most targeted use case, then letting client code 
to set just one "free easy handle" multi-option in one line
is a much more attractive solution for client code than writing multi-line 
handle iterating code freeing the handles which needs testing and debugging in 
each individual client use case.

Thanks,
Dmitry Karpov


-----Original Message-----
From: Daniel Stenberg <dan...@haxx.se> 
Sent: Tuesday, August 29, 2023 2:39 PM
To: Dmitry Karpov via curl-library <curl-library@lists.haxx.se>
Cc: Dmitry Karpov <dkar...@roku.com>
Subject: RE: [EXTERNAL] Re: Getting a list of easy handles in a multi handle - 
possible?

On Tue, 29 Aug 2023, Dmitry Karpov via curl-library wrote:

> I think this discussion started from a pretty simple request to close 
> and free easy handles that were previously added to a multi-handle 
> because the
> curl_multi_cleanup() removes easy handles from the multi-handle but 
> doesn't close them.

Jeroen then mentioned a closely related feature request from 2016, and by 
returning all handles the way we have discussed we can fulfill both requests 
with the same single API, while your proposal here only satisfies one of them...

-- 

  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to