Thread pool pattern impleminted