I have been wondering how Tokio works under the hood and how to set it up properly. I have a web scraper in Rust, so concurrency is extremely important.
My understanding of threading for Tokio is that there is a thread pool with one thread per core. On top of this, to keep threads busy, I imagine Tokio uses epoll to create an event loop. Does Tokio create an isolated event loop for each thread?
Since I have a lot of IO bound tasks, how do I submit these tasks to Tokio so that they are distributed among the thread pool?
Also, if a future in created on one thread, is there any chance that it will finish executing on a different thread?
I have an entry point to my application. How do I construct the most performant Tokio setup on start of my application?