News for hackers. Stuff that matters.
Re:Tokio 1.0 – async runtime for Rust by steveklabnik on Wednesday December 23, 2020 @06:35PM (#25523540)
I am not saying that the borrow checker cannot handle locks. Locks work great.

(The borrow checker does not understand locks as a special construct, to be extra clear.)

Did you read the post I linked? It lays out the details. I am happy to clarify if you don’t get the specifics.

Re:Tokio 1.0 – async runtime for Rust by btrask on Wednesday December 23, 2020 @06:49PM (#25523651)
I see now, I misunderstood your original post. You were saying async/await is necessary because futures work badly, not because all the alternatives (i.e. locks) work badly.

Sorry, my mistake!

Edit to add: futures work badly in every language, so there's no shame in the borrow checker not working with them.

Edit 2: But in that case we're back to "why would Rust want async/await over (potentially green) threads with its first-class support for locks?"

Re:Tokio 1.0 – async runtime for Rust by dwoot on Wednesday December 23, 2020 @10:55PM (#25524902)
I believe these are the talks from Steve that he's referring to. It was enlightening for me:

1. Rust's Journey to Async/Await - https://www.youtube.com/watch?v=lJ3NC-R3gSI

2. The Talk You've been Await-ing for - https://www.youtube.com/watch?v=NNwK5ZPAJCk

The first video goes into all the bits you're concerned about and all the things that Rust has tried before arriving where they are now

Re:Tokio 1.0 – async runtime for Rust by ragnese on Thursday December 24, 2020 @06:26AM (#25526629)
Language support for green threads require a heavier runtime (so you'd pay the performance cost even when you didn't write async code).

Tokio basically is green threads as a library.

Re:Tokio 1.0 – async runtime for Rust by steveklabnik on Wednesday December 23, 2020 @07:05PM (#25523760)
Regarding your edit 2, I linked two talks I have that go over this in great detail elsewhere in this thread.