Refactor ProcessThreadFactory