Solved the thread-pool initialization.