When I run the jstack command, I can see a thread named "Service Thread". What is it, and what does it do?
When I run the jstack command, I can see a thread named "Service Thread". What is it, and what does it do?
The thread with the name "Service Thread" is an internal thread to the JVM that is implemented in the JVM native code. It waits for notifications for certain internal events and then processes them. According to the OpenJDK Java 11 source code, these are:
I can't tell you what those events all mean. If you really want (or need) to know, read the OpenJDK source code for yourself. Otherwise, it is safe to ignore this thread.