Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

EventQueues and Threads: msg#00126

Subject: EventQueues and Threads
We discussed in the past a Thread Throttle to limit the number of Threads
for EventQueues.

Really I think the right solution is a Thread Pool, (and/or a Runnable
Queue). If we convert the EventQueue to a Runnable and pull threads from the
pool as they become available (and/or stick the Runnables in a queue for
processing, either way we achieve the same effect: The threads, of which
there are a limited number, get reused), this eliminates the need for a
throttle, and makes much better reuse of Threads, so 'keeping it alive for a
minute' is no longer necessary: The life of the unused Thread itself can be
handled by the Pool.

Does this sound like the right solution to you? Or at least headed in the
direction of the right solution?

I just wanted to check with you before I start down a path that won't lead
to everyone's consent.

-Travis Savo <tsavo@xxxxxxxxx>


<Prev in Thread] Current Thread [Next in Thread>