Add the possibility to call a function from the worker threadpool

It has been added to help the application to initialize TLS for each
workers.