curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: "curl_multi_unblock"

From: Stefan Eissing via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 10 Oct 2019 16:22:24 +0200

Thinking about how I might use the curl_multi_unblock(). It seems unreliable in the sense that a thread calling this cannot be sure that another thread is actually blocked. The other one might be about to enter a blocking state and the unblock is just a bit too early...

So, threads who want to reliably use this need an additional synch mechanism/condition variable. Hmm. Just like any conditional needs to be guarded by a mutex, really.

So, I do not know how useful curl_multi_unblock() alone might be.

In my curl use for ACME, I could make use of a curl_multi_abort(). By which I mean the abort of all contained easy handles and a subsequent unblock(). (I do not claim this to be *the* use case, just one which I can see for myself)

Cheers, Stefan

> Am 10.10.2019 um 15:56 schrieb Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>:
>
> Hi,
>
> The other day I mentioned the curl_easy_abort() idea on how to stop an easy transfer from another thread:
>
> https://github.com/curl/curl/wiki/curl_easy_abort
>
> Here's the similar idea but for "unblocking" a multi interface wait/poll call. I call it "curl_multi_unblock" as a working title.
>
> Details are here:
>
> https://github.com/curl/curl/wiki/curl_multi_unblock
>
> --
>
> / daniel.haxx.se | Get the best commercial curl support there is - from me
> | Private help, bug fixes, support, ports, new features
> | https://www.wolfssl.com/contact/
> -------------------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-10-10