Re: init's children list is long and slows reaping children.

Ingo Oeser
2007-04-10T22:35:07Z

On Tuesday 10 April 2007, Jeff Garzik wrote:
> Thus, rather than forcing authors to make their code more complex, we
> should find another solution.

What about sth. like the "pre-forking" concept? So just have a thread creator thread,
which checks the amount of unused threads and keeps them within certain limits.

So that anything which needs a thread now simply queues up the work and
specifies, that it wants a new thread, if possible.

One problem seems to be, that a thread is nothing else but a statement
on what other tasks I can wait before doing my current one (e.g. I don't want to
mlseep() twice on the same reset timeout).
But we usually use locking to order that.

Do I miss anything fundamental here?

Regards

Ingo Oeser