tokio-rs / doc-push

Tokio doc blitz effort - A concerted effort to improve Tokio's documentation.
MIT License
50 stars 7 forks source link

Gotchas #14

Open rylev opened 5 years ago

rylev commented 5 years ago

Having a section on "gotchas" or trouble shooting will be important. Most issues people run into with Tokio probably come down to 3-5 different problems. Having go-to explanations of these will help.

One specific set of gotchas around Tokio is the use of impl Future and lifetimes. There are issues with the borrow checker that users who have written a fair amount of Rust may encounter for the first time when using Futures. Having a section that talks through some subtleties even if they aren't really specific to Tokio would be good.

carllerche commented 5 years ago

Do you have thoughts about where this would fit in the outline?

emschwartz commented 5 years ago

In this vein:

Generally, it would be good to have a section like this organized by what issue you might be seeing and what some likely causes are, for example "a stream combinator executes once and then hangs", or "the future stops and the RUST_LOG=trace shows an event added to the tokio loop".

emschwartz commented 5 years ago

@carllerche I could see this being in a Troubleshooting section at the end

rylev commented 5 years ago

As @emschwartz suggests, I think having a dedicated troubleshooting/gotchas/FAQ section would be helpful.