Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31796

Re: How to programatically limit the number of threads in a java

From dolnotmail@nomail.com (e)
Newsgroups comp.lang.java.programmer
Subject Re: How to programatically limit the number of threads in a java
Date 2015-06-15 03:33 +0000
Organization A noiseless patient Spider
Message-ID <mllgve$6g9$1@dont-email.me> (permalink)
References <d2e186ee-1bab-4737-9462-9031b6e2839e@googlegroups.com> <mitjo5$dn$1@gwaiyur.mb-net.net> <3yws2b8pk2kq.198es8aoaybyr.dlg@40tude.net> <556faf0a$0$292$14726298@news.sunsite.dk>

Show all headers | View raw


In article <556faf0a$0$292$14726298@news.sunsite.dk>, =?windows-1252?Q?Arne_Vajh=F8j?= <arne@vajhoej.dk> wrote:
>[sorry if duplicate post]
>
>On 5/13/2015 3:48 AM, Joerg Meier wrote:
> > On Tue, 12 May 2015 21:19:33 +0200, Marcel Mueller wrote:
> >
> > Disclaimer: I only just now looked into this topic, so my answers may not
> > be the end all.
> >
> >> On 12.05.15 17.49, Ajay Paul wrote:
> >>> How to programatically limit the number of threads in a java.
> >> Simply do not start more threads than wanted.
> >> Java will not start more than one thread automatically.
> >
> > Java might start (at least) three threads on its own (main, edt and 
>garbage
> > collection).
>
>I think that even the number of GC threads can be manipulated via
>XX options (like -XX:ParallelGCThreads=n).
>
>Arne
>
>

A ThreadPoolExecutor is a good thing to use for this.

Eric

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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