Merge pull request #725 from knocte/threadpool_init