Displaying 3 results from an estimated 3 matches for "allocate_handle".
2023 Feb 22
1
[PATCH nbdkit] curl: Try to share as much as possible between handles in the pool
...free_handle (curl_handles.ptr[i]);
curl_handle_list_reset (&curl_handles);
+
+ /* Free share data. */
+ curl_share_cleanup (share);
+
+ for (i = 0; i < ARRAY_SIZE (lockarray); ++i)
+ pthread_rwlock_destroy (&lockarray[i]);
}
/* Get a handle from the pool.
@@ -221,6 +262,9 @@ allocate_handle (void)
goto err;
}
+ /* Share settings with other handles. */
+ curl_easy_setopt (ch->c, CURLOPT_SHARE, share);
+
/* Various options we always set.
*
* NB: Both here and below constants must be explicitly long because
@@ -519,3 +563,30 @@ free_handle (struct curl_handle *c...
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.
2023 Feb 22
1
[PATCH nbdkit] curl: Try to share as much as possible between handles in the pool
...list_reset (&curl_handles);
> +
> + /* Free share data. */
> + curl_share_cleanup (share);
> +
> + for (i = 0; i < ARRAY_SIZE (lockarray); ++i)
> + pthread_rwlock_destroy (&lockarray[i]);
> }
>
> /* Get a handle from the pool.
> @@ -221,6 +262,9 @@ allocate_handle (void)
> goto err;
> }
>
> + /* Share settings with other handles. */
> + curl_easy_setopt (ch->c, CURLOPT_SHARE, share);
> +
> /* Various options we always set.
> *
> * NB: Both here and below constants must be explicitly long because
> @@ -5...