| 3 | #include <iostream> |
| 4 | |
| 5 | int main() { |
| 6 | using namespace utl; |
| 7 | |
| 8 | parallel::ThreadPool pool; // uses as many threads as it detects |
| 9 | |
| 10 | pool.detached_task([]{ std::cout << "Hello from the task\n"; }); |
| 11 | |
| 12 | pool.set_thread_count(0); // will wait for the tasks, join all threads and release the memory |
| 13 | } |
nothing calls this directly
no test coverage detected