Historical note - I never liked having a reaper thread for each
subprocess, but no other reliable implementation is known.  Given the
potential for many reaper threads, I at least wanted to keep the
memory waste low.

On Wed, Jan 13, 2016 at 2:25 AM, cheleswer sahu
<cheleswer.s...@oracle.com> wrote:

> +                   Thread t = null;
> +                   if
> (Boolean.getBoolean("processReaperUseDefaultStackSize")) {
> +                       t = new Thread(systemThreadGroup, grimReaper,
> "process reaper");
> +                    } else {
> +                       // Our thread stack requirement is quite modest.
> +                       t = new Thread(systemThreadGroup, grimReaper,
> "process reaper", 32768);
> +                    }

If we do end up using this strategy, cleaner would be to use
https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#Thread-java.lang.ThreadGroup-java.lang.Runnable-java.lang.String-long-
stackSize - the desired stack size for the new thread, or zero to
indicate that this parameter is to be ignored.

Reply via email to