Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #10374
| From | Daniel Pitts <newsgroup.nospam@virtualinfinity.net> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Thread question |
| References | <i9tbd7ppgalucct4i2t2agj9hldjumnmk4@4ax.com> <081cd7paqgsa8bbg5gjh8v1kinfp7asgt0@4ax.com> <q5ecd7d0rnk86qeqab0r42qpjrff2007mc@4ax.com> |
| Message-ID | <5RvBq.2561$8O1.1041@newsfe07.iad> (permalink) |
| Date | 2011-11-30 11:53 -0800 |
On 11/30/11 6:10 AM, Roedy Green wrote: > On Wed, 30 Nov 2011 02:32:14 -0800, Roedy Green > <see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted > someone who said : > >> ThreadPoolExecutor is looking promising, though overly elaborate. > > I got my code to compile. Then I discovered something quite idiotic > about the class, Quoting Goetz et al "There is no predefined > saturation policy to make "execute" block when the work queue is > full." > > Huh? is that not the most common case? > So it looks like I have to compose a custom blocking policy handler. > There is a somewhat useful alternative, which is the CallerRunPolicy. Then look at the implementations (in ThreadPoolExecutor) for http://docs.oracle.com/javase/6/docs/api/index.html?java/util/concurrent/RejectedExecutionHandler.html <http://docs.oracle.com/javase/6/docs/api/index.html?java/util/concurrent/ThreadPoolExecutor.html>
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Thread question Roedy Green <see_website@mindprod.com.invalid> - 2011-11-30 01:31 -0800
Re: Thread question Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-11-30 01:48 -0800
Re: Thread question Roedy Green <see_website@mindprod.com.invalid> - 2011-11-30 02:32 -0800
Re: Thread question Roedy Green <see_website@mindprod.com.invalid> - 2011-11-30 02:48 -0800
Re: Thread question Patricia Shanahan <pats@acm.org> - 2011-11-30 03:11 -0800
Re: Thread question Paul Cager <paul.cager@googlemail.com> - 2011-11-30 07:10 -0800
Re: Thread question Patricia Shanahan <pats@acm.org> - 2011-11-30 09:34 -0800
Re: Thread question Roedy Green <see_website@mindprod.com.invalid> - 2011-11-30 06:10 -0800
Re: Thread question markspace <-@.> - 2011-11-30 06:13 -0800
Re: Thread question Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-30 11:53 -0800
Re: Thread question Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-30 07:28 -0500
Re: Thread question markspace <-@.> - 2011-11-30 05:30 -0800
Re: Thread question Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-30 21:04 -0500
Re: Thread question markspace <-@.> - 2011-11-30 18:28 -0800
Re: Thread question markspace <-@.> - 2011-11-30 05:50 -0800
Re: Thread question markspace <-@.> - 2011-11-30 06:04 -0800
Re: Thread question Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-30 11:48 -0800
Re: Thread question Roedy Green <see_website@mindprod.com.invalid> - 2011-11-30 13:23 -0800
csiph-web