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
-