Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the "system-dependent default" thread pool?

From the AsynchronousFileChannel API:

When an AsynchronousFileChannel is created without specifying a thread pool then the channel is associated with a system-dependent default thread pool that may be shared with other channels.

I haven't seen this terminology anywhere else, and I haven't found any concrete explanation via web search. What exactly is the system-dependent default thread pool? What are its characteristics? And how might they vary between systems?

like image 931
arkon Avatar asked Aug 06 '15 08:08

arkon


1 Answers

Just read the documentation a bit more:

The default thread pool is configured by the system properties defined by the AsynchronousChannelGroup class.

And if you jump there, you see:

In addition to groups created explicitly, the Java virtual machine maintains a system-wide default group that is constructed automatically. Asynchronous channels that do not specify a group at construction time are bound to the default group. The default group has an associated thread pool that creates new threads as needed. The default group may be configured by means of system properties defined in the table below. Where the ThreadFactory for the default group is not configured then the pooled threads of the default group are daemon threads.

...followed by the list of configuration parameters.

like image 186
biziclop Avatar answered Oct 10 '22 22:10

biziclop