refactored threading mechanism config to able to use worker config as thread.