Displaying 3 results from an estimated 3 matches for "lockarray".
Did you mean:
blockarray
2023 Feb 22
1
[PATCH nbdkit] curl: Try to share as much as possible between handles in the pool
...url_lock_access access, void *userptr);
+static void unlock_cb (CURL *handle, curl_lock_data data,
+ void *userptr);
+
+/* These locks protect access to the curl share data. See:
+ * https://gist.github.com/bagder/7eccf74f8b6d70b5abefeb7f288dba9b
+ */
+static pthread_rwlock_t lockarray[CURL_LOCK_DATA_LAST];
+
+/* Curl share data. */
+static CURLSH *share;
/* This lock protects access to the curl_handles vector below. */
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
@@ -90,18 +103,46 @@ static curl_handle_list curl_handles = empty_vector;
static pthread_cond_t cond...
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
...tr);
> +static void unlock_cb (CURL *handle, curl_lock_data data,
> + void *userptr);
> +
> +/* These locks protect access to the curl share data. See:
> + * https://gist.github.com/bagder/7eccf74f8b6d70b5abefeb7f288dba9b
> + */
> +static pthread_rwlock_t lockarray[CURL_LOCK_DATA_LAST];
> +
> +/* Curl share data. */
> +static CURLSH *share;
>
> /* This lock protects access to the curl_handles vector below. */
> static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
> @@ -90,18 +103,46 @@ static curl_handle_list curl_handles = empty_...