tokio-rs / website

Website for the Tokio project
https://tokio.rs
MIT License
227 stars 328 forks source link

Sender In standard library channel is Sync #726

Closed yeoleobun closed 8 months ago

yeoleobun commented 8 months ago

There is an outdated information at https://github.com/tokio-rs/website/blob/68765467d8d168c959ac39ba7cc37df7cee3678e/content/tokio/tutorial/async.md?plain=1#L419.

According https://doc.rust-lang.org/std/sync/mpsc/struct.Sender.html#impl-Sync-for-Sender%3CT%3E , Sender in standard library channel is Sync since 1.72.0, so the Sync constrain of Waker trait in Task struct is also satisfied by use a standard channel receiver.

Remove crossbeam dependency would make this chapter concisely, I'm glad to help.

Darksonn commented 8 months ago

I would be happy to see this updated in the tutorial.