[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/3] thread-pool: replace semaphore with condition variabl
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v3 2/3] thread-pool: replace semaphore with condition variable |
Date: |
Tue, 17 May 2022 16:19:58 +0100 |
On Sat, May 14, 2022 at 08:50:11AM +0200, Paolo Bonzini wrote:
> @@ -134,6 +122,12 @@ static void *worker_thread(void *opaque)
> pool->cur_threads--;
> qemu_cond_signal(&pool->worker_stopped);
> qemu_mutex_unlock(&pool->lock);
> +
> + /*
> + * Wake up another thread, in case we got a wakeup but decided
> + * to exit due to pool->cur_threads > pool->max_threads.
> + */
> + qemu_cond_signal(&pool->worker_stopped);
&pool->worker_stopped? Was this supposed to be &pool->request_cond?
signature.asc
Description: PGP signature
[PATCH v3 3/3] thread-pool: remove stopping variable, Paolo Bonzini, 2022/05/14
Re: [PATCH v3 0/3] thread-pool: fix performance regression, Nicolas Saenz Julienne, 2022/05/17