pramsey/pgsql-http

memory callbacks are not thread safe

Closed this issue · 1 comments

Since doc https://curl.se/libcurl/c/curl_global_init_mem.html memory callbacks used in curl_global_init_mem must be thread safe, because usually curl is build with threaded resolver.

Well, curl_global_init_mem is currently disabled, so... and if I recall, were disabled because they were flakey for non-obvious reasons, which tracks. I'm not sure how we'd make them safe, I'm not a threading expert, and not sure if a local semaphor would be useful at all. Since all we're doing is passing the actually calls into the PgSQL mem manager... ?