equal
deleted
inserted
replaced
79 ThreadGroup tg = Thread.currentThread().getThreadGroup(); |
79 ThreadGroup tg = Thread.currentThread().getThreadGroup(); |
80 while (tg.getParent() != null) tg = tg.getParent(); |
80 while (tg.getParent() != null) tg = tg.getParent(); |
81 ThreadGroup systemThreadGroup = tg; |
81 ThreadGroup systemThreadGroup = tg; |
82 |
82 |
83 ThreadFactory threadFactory = grimReaper -> { |
83 ThreadFactory threadFactory = grimReaper -> { |
84 // Our thread stack requirement is quite modest. |
84 long stackSize = Boolean.getBoolean("jdk.lang.processReaperUseDefaultStackSize") ? 0 : 32768; |
85 Thread t = new Thread(systemThreadGroup, grimReaper, |
85 Thread t = new Thread(systemThreadGroup, grimReaper, "process reaper", stackSize); |
86 "process reaper", 32768); |
|
87 t.setDaemon(true); |
86 t.setDaemon(true); |
88 // A small attempt (probably futile) to avoid priority inversion |
87 // A small attempt (probably futile) to avoid priority inversion |
89 t.setPriority(Thread.MAX_PRIORITY); |
88 t.setPriority(Thread.MAX_PRIORITY); |
90 return t; |
89 return t; |
91 }; |
90 }; |