[D-runtime] A mechanism to kill threads

Fawzi Mohamed fawzi at gmx.ch
Fri May 18 07:43:41 PDT 2012


On Fri, 18 May 2012 15:49:30 +0200
Artur Skawina <art.08.09 at gmail.com> wrote:

> On 05/18/12 14:46, Fawzi Mohamed wrote:
> > Now imagine you suspend or kill a thread while the spinlock to the
> > common pool of fat locks is being held in the kernel...
> 
> If a thread can be killed while in kernel mode and all
> kernel-acquired resources aren't freed, then it's a kernel bug.
> Period. If some /userspace/ system library does that kind of
> "optimizations", that's a bit different, but still at least means a
> proper safe API is missing.

I tend to agree in the case of the example I did (and I had the problem
with suspending, not sure what will happen if one kills it).
But I am not sure there is any standard agreed guarantee when killing
threads in non signal safe functions.
Collection of some resources is guanteed only for process killing.




More information about the D-runtime mailing list