Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #31681
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: How to programatically limit the number of threads in a java |
| Date | 2015-05-12 12:01 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <mit82h$8g6$1@dont-email.me> (permalink) |
| References | <d2e186ee-1bab-4737-9462-9031b6e2839e@googlegroups.com> |
On 5/12/2015 11:49 AM, Ajay Paul wrote:
> How to programatically limit the number of threads in a java. I know the settings in different application servers such as websphere to do that, but how do we do it programatically.
By starting the number of threads you want, no more and no less.
That's not a perfect answer, because it controls only the number
of threads *you* start (or allow to finish, or don't start at all).
If classes not under your direct control start their own threads, or
if the JVM itself starts threads for its own purposes, they are pretty
much immune to your influence except insofar as they offer a means to
provide hints and limits.
Do you want to limit the total number of threads running in the
JVM? Why? What are you trying to accomplish?
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to programatically limit the number of threads in a java Ajay Paul <ajaykpaul@gmail.com> - 2015-05-12 08:49 -0700
Re: How to programatically limit the number of threads in a java Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-05-12 12:01 -0400
Re: How to programatically limit the number of threads in a java Marcel Mueller <news.5.maazl@spamgourmet.org> - 2015-05-12 21:19 +0200
Re: How to programatically limit the number of threads in a java Joerg Meier <joergmmeier@arcor.de> - 2015-05-13 09:48 +0200
Re: How to programatically limit the number of threads in a java Arne Vajhøj <arne@vajhoej.dk> - 2015-06-03 21:51 -0400
Re: How to programatically limit the number of threads in a java dolnotmail@nomail.com (e) - 2015-06-15 03:33 +0000
Re: How to programatically limit the number of threads in a java Robert Klemme <shortcutter@googlemail.com> - 2015-06-15 08:23 +0200
Re: How to programatically limit the number of threads in a java Arne Vajhøj <arne@vajhoej.dk> - 2015-06-03 21:50 -0400
csiph-web