Browse Source

Updated documentation

yhirose 5 years ago
parent
commit
aec2f9521d
1 changed files with 7 additions and 2 deletions
  1. 7 2
      README.md

+ 7 - 2
README.md

@@ -297,13 +297,18 @@ Please see [Server example](https://github.com/yhirose/cpp-httplib/blob/master/e
 
 ### Default thread pool support
 
+`ThreadPool` is used as a **default** task queue, and the default thread count is 8, or `std::thread::hardware_concurrency()`. You can change it with `CPPHTTPLIB_THREAD_POOL_COUNT`.
 
-`ThreadPool` is used as a default task queue, and the default thread count is set to value from `std::thread::hardware_concurrency()`.
+If you want to set the thread count at runtime, there is no convenient way... But here is how.
 
-You can change the thread count by setting `CPPHTTPLIB_THREAD_POOL_COUNT`.
+```cpp
+svr.new_task_queue = [] { return new ThreadPool(12); };
+```
 
 ### Override the default thread pool with yours
 
+You can supply your own thread pool implementation according to your need.
+
 ```cpp
 class YourThreadPoolTaskQueue : public TaskQueue {
 public: