search for: curl_lock_data_connect

Displaying 4 results from an estimated 4 matches for "curl_lock_data_connect".

2023 Feb 22
1
[PATCH nbdkit] curl: Try to share as much as possible between handles in the pool
On Wed, Feb 22, 2023 at 04:52:35PM +0100, Laszlo Ersek wrote: ... > Seems sane to me in general, except for the fact that the documentation > at <https://curl.se/libcurl/c/CURLSHOPT_SHARE.html> writes: > > """ > CURL_LOCK_DATA_CONNECT > > Put the connection cache in the share object and make all easy handles > using this share object share the connection cache. > > Note that due to a known bug, it is not safe to share connections this > way between multiple concurrent threads. [...] > """ &g...
2023 Feb 22
1
[PATCH nbdkit] curl: Try to share as much as possible between handles in the pool
...(share == NULL) { > + nbdkit_error ("curl_share_init: %m"); > + exit (EXIT_FAILURE); > + } > + curl_share_setopt (share, CURLSHOPT_LOCKFUNC, lock_cb); > + curl_share_setopt (share, CURLSHOPT_UNLOCKFUNC, unlock_cb); > + curl_share_setopt (share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT); > + curl_share_setopt (share, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE); > + curl_share_setopt (share, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS); > + curl_share_setopt (share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION); error checking missing > +} > + > +void > +unload_pool (...
2023 Feb 22
1
[PATCH nbdkit] curl: Try to share as much as possible between handles in the pool
...e = curl_share_init (); + if (share == NULL) { + nbdkit_error ("curl_share_init: %m"); + exit (EXIT_FAILURE); + } + curl_share_setopt (share, CURLSHOPT_LOCKFUNC, lock_cb); + curl_share_setopt (share, CURLSHOPT_UNLOCKFUNC, unlock_cb); + curl_share_setopt (share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT); + curl_share_setopt (share, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE); + curl_share_setopt (share, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS); + curl_share_setopt (share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION); +} + +void +unload_pool (void) +{ + size_t i; + + /* Close and free all handles in...
2023 Feb 22
2
[PATCH nbdkit] curl: Try to share as much as possible between handles in the pool
I'm mainly posting this to the list as a back-up. It does work, it does _not_ improve performance in any noticable way. However I'm having lots of trouble getting HTTP/2 to work (with or without this patch) and that's stopping me from testing anything properly. Rich.