Optimize worker thread construction.