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
Post a Comment