Passed thread id from thread pool to task functions