The default number of global threads for idea is 2. Why?

debug

Mar.01,2021

use Thread.currentThread (). GetThreadGroup (). List () to list which threads belong to the current thread group. The output format of the thread is [thread name, thread priority, thread group name]:

public class Main {

    public static void main(String[] args) {

        Thread.currentThread().getThreadGroup().list();

    }
}

run result:

it can be seen that in addition to the main thread ("Thread [main]"), there is also a "Monitor Ctrl-Break" thread, which should be the monitoring thread of your program started by IDEA through reflection, along with your program. This is not a problem. The official API also said that Thread.activeCount () only returns an estimate, so you can't rely on this value to determine how many threads are currently running.


Open the application jvisualvm.exe
under the bin directory under javahome to see the detailed thread status, and all threads in your debug mode can see

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32af1-2be4b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32af1-2be4b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?