Using thread pools

To use thread pools, you don't need a special library. Instead, you can implement a scheduler that sends requests to a bunch of threads. You can even check the responses of workers to decide which thread to choose for processing, but there are ready-to-use crates that help to solve this issue more elegantly. In this section, we're going to look at the futures-cpupool and tokio-threadpool crates. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.136.63