Re: Bug 324228 – support threadpool exiting idle threads
- From: Martyn Russell <martyn imendio com>
- To: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Bug 324228 – support threadpool exiting idle threads
- Date: Fri, 23 Dec 2005 19:52:02 +0000
On Fri, 2005-12-23 at 19:48 +0000, Martyn Russell wrote:
> On Fri, 2005-12-23 at 12:24 -0500, Matthias Clasen wrote:
> > For the idle timeout patch, I think we need to understand the desired
> > behaviour a bit better, before rushing it in. My understanding of the
> > current threadpool behaviour is the following:
> >
> > 1) there is a global pool of idle threads, which can be restricted in
> > size by setting max-idle-threads to some non-negative number
>
> This actually can be negative, you can have unlimited idle threads, this
> means of course that none are cleaned up ever and the number of threads
> increases depending on demand up to the maximum thread limit.
>
> >
> > 2) threadpools take idle threads from the global pool to do their work
> >
> > 3) if a threadpool has no more tasks to give to a thread, the thread is
> > moved back to the global idle threads pool after a delay of 0.5s
> >
> >
> > Is the idea to make the delay in 3) changeable, or is the idea to
> > introduce a second timeout that would cause threads to be removed from
> > the global pool ?
It should be noted that the current patch will only wait for tasks in
the same thread pool, it does not go back to the global thread pool to
see if other thread pools have work waiting.
--
Regards,
Martyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]