Changed conditions for worker thread creation.