qemu-devel
[Top][All Lists]
Advanced

[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: Paolo Bonzini
Subject: Re: [PATCH v3 2/3] thread-pool: replace semaphore with condition variable
Date: Tue, 17 May 2022 17:21:05 +0200

On Tue, May 17, 2022 at 5:20 PM Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> 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?

Yes, of course.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]