Latest updated thread pool code with fixes and additions.