The javadoc for
Executors.newSingleThreadScheduledExecutor
says
“… the returned executor is guaranteed not to be reconfigurable to use additional threads”.
What does the above sentence mean? Does it mean the returned instance may not have nested threads?
It means that you cannot add additional threads to this executor after it has been created. It is guaranteed to have only one thread.
This is useful when want to ensure that only a single background task is active at any given time in your application. Mostly useful when you will be providing a reference to this executor to potentially untrusted code (code written by someone other than you).