curl / Mailing Lists / curl-library / Single Mail

curl-library

Global lock for lazy PSL loading ?

From: Tim Ruehsen <tim.ruehsen_at_gmx.de>
Date: Mon, 12 Dec 2016 17:08:14 +0100

Hi,

I would like to improve the PSL code in Curl_cookie_add(), namely use
psl_latest() instead of psl_builtin() if possible.

That function eventually introduces (local) loading of the latest available
PSL data (either DAFSA or plain text PSL).
So I think of a static/global psl_ctx_t variable, that will be lazy-
initialized on the first call to Curl_cookie_add().

That needs a global locking function... well, what do you suggest ?
[I am pretty sure that Curl_share_lock() is not the solution (might result in
several one PSL loading per Curl_easy instance), but didn't find a better
function yet.]

Regards, Tim

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html

Received on 2016-12-12