qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v2 5/8] thread-pool: Implement .cancel_async


From: Fam Zheng
Subject: Re: [Qemu-devel] [RFC PATCH v2 5/8] thread-pool: Implement .cancel_async
Date: Tue, 26 Aug 2014 17:26:32 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, 08/26 10:42, Paolo Bonzini wrote:
> Il 26/08/2014 08:08, Fam Zheng ha scritto:
> > +    qemu_mutex_lock(&pool->lock);
> > +    if (thread_pool_cancel_from_queue(elem)) {
> > +        elem->state = THREAD_CANCELED_ASYNC;
> > +    }
> 
> Can you simply set it to THREAD_DONE (and set elem->ret to -ECANCELED)?
> 

Yes, that should work.

Fam



reply via email to

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