Thread Pool Tutorial - How-To

Have you ever wanted to execute a large number of tasks asynchronously without the hassle and overhead of maintaining threads? If so, a thread pool is just the right thing for you. Create once and delegate all your tasks for parallel execution on a configurable number of threads, without paying the costs of constant creating and stopping individual threads. Full source: https://pastebin.com/MM5kSvH6