SamSuka
noboilerplate
noboilerplate

patreon


Async doesn't exist and cannot hurt you

Hi folks!

I have explained the joy of rust at length on my channel, HOWEVER, some of what I have mentioned breaks down when interacting with async rust.

Though the compiler is getting more and more helpful with each iteration, async is still a sharp edge, especially for newcomers.

But you don't have to use it.

---

Hope you like the video, I learned a lot about the plumbing of the rust's async system and threads while making it. I'd love to know your thoughts, especially as we're right up against my understanding!

Next month, if all goes well, I will be publishing my grand unified theory of building a second brain with Obsidian!

Thank you so much for your support,

Tris <3

Async doesn't exist and cannot hurt you

Comments

I have great news! As I said towards the end of the video - tokio's actually fine for servers like axum, the static issue doesn't really affect the request-response lifecycle :-D

No Boilerplate

I just started running into this myself, this video is super timely. The most mature web service framework (axum) is built on top of tokio; do you have an alternative you'd recommend?

Grey Lathrop

If it's not causing you any pain, you might find you have an easier life just sticking with it! ESPECIALLY if it's a server of some sort, that's actually a fine use of tokio. That being said, this crate is what you'll need: https://docs.rs/async-compat/latest/async_compat/

No Boilerplate

what do you suggest for a project that already uses tokio?

Companion Technology

Oh interesting! Was the section explaining them at 1:55 unsatisfactory?

No Boilerplate

Very exciting; I did have to search the definition of concurrency and parallelism; it would have been nice to have in the video

Companion Technology

I'm quite optimistic about it, I'm really pleased we have a pluggable backend, so folks in embedded, say, can use a compatible executor, instead of only having one option! I agree with most of the conclusions here: https://corrode.dev/blog/async/

No Boilerplate

Funny enough, my first major project got stun-locked by weird/over-my-head Tokio "stream" stuff that I couldn't figure out.

Hacksaw Kristy

I agree a lot with what you said about rayon and preferring to use std::thread over async. It always felt like a lot of overhead for something that was pretty trivial to use out of the box if you do it right. Would love to hear more on your thoughts about the future of async in rust, and what that means for other runtimes

Reese Hatfield

hehe, I think it sounds ok for me - try with headphones to double check :-D

No Boilerplate

Sounds like more echo? Different recording environment? Or it’s me - forgot I am in a bathroom and had turned it up ☺️

Shane Cole


More Creators