added polling option to thread pool