|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] Re: [PATCH 1/3] Introduce threadlets |
Date: | Tue, 19 Oct 2010 21:29:59 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.3 |
On 10/19/2010 09:12 PM, Balbir Singh wrote:
> >Ideally you need > > > > s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); > > > > But qemu will need to wrap this around as well. > > Why? QEMU is never using thread cancellation. Yes, I agree, in the longer run, cancellation is a good way to kill threads, specially in a thread pool. My comment was more along the lines of good practices and potential use of pthread_cancel(), not a strict comment on something urgent or broken.
But there is no such use; as long as we keep ourselves to the qemu-thread API, we know that nothing will use cancellation.
The day qemu-thread will introduce cancellation functions we'll care about enabling/disabling it in some threads.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |