java - Differences between these 2 factory methods -


i know difference between these 2 methods:

public static executorservice newfixedthreadpool(int nthreads) 

and

public static executorservice newfixedthreadpool(int nthreads, threadfactory tf) 

obviously 1 takes specified threadfactory threads creation. know kind of standard threadfactory former use? why convenient using latter rather former or vice-versa? in advance.

the first 1 uses defaultthreadfactory inner class of executors. when define own threadfactory can influence created threads. can choose name, priority, etc.


Comments

Popular posts from this blog

How to logout from a login page in asp.net -

Stack level too deep error after upgrade to rails 3.2 and ruby 1.9.3 -