naive thread pool (need rework to be lock free)