sort worker-thread init functions in advance