The privilegedThreadFactory method returns a thread factory that creates thread with same permission as main thread.