Manage number of tasks with boost thread pool