You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am learning Tokio with its tutorial. The tutorial uses an async block which I think is unnecessary:
tokio::spawn(asyncmove{process(socket).await;});
can be simplified into:
tokio::spawn(process(socket));
I'm not quite sure so I opened this issue to confirm this. If this is true, I think it worth explanation in the tutorial. If not, I'd like to know what are the differences between these two.
The text was updated successfully, but these errors were encountered:
https://github.com/tokio-rs/website/blob/48e89baca324065d5b608d776dc31f99e5efc1bc/tutorial-code/spawning/src/main.rs#L15C8-L15C8
I am learning Tokio with its tutorial. The tutorial uses an async block which I think is unnecessary:
can be simplified into:
I'm not quite sure so I opened this issue to confirm this. If this is true, I think it worth explanation in the tutorial. If not, I'd like to know what are the differences between these two.
The text was updated successfully, but these errors were encountered: