On Mon, 28 Aug 2023, Paul Fotheringham wrote:

To my mind you only need to consider two things to make it safe:

1. Make a copy of the handle list initially to ensure handles added by
the callbacks don't get a callback invoked on them.
2. After each callback finishes check that the next handle is still in
the multi's list to ensure we skip any handle removed by the
callbacks.

Sure. Or we avoid the recursive callback and we don't complicate our lives more than we have to.

In this case, all non-callbacks version we have discussed seem much easier to me. Both to provide as an API and to use as an application.

--

 / 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