zlacker

[return to "Avoid Async Rust at All Cost"]
1. the_mi+87[view] [source] 2024-01-23 12:34:44
>>jmakov+(OP)
I think the better way to think about async Rust is to use it when it's beneficial to developer productivity and to avoid it when not. There are quite a few situations where it makes the code easier compared to alternatives you could come up with.

I don't think for a second that async Rust should be picked for performance reasons.

You get a feeling for what is a good use of async and bad use of async relatively easily these days as the ecosystem is maturing.

◧◩
2. baq+88[view] [source] 2024-01-23 12:40:47
>>the_mi+87
What arguments are there for async if not performance? Threads/fibers/gofuncs/actors/... are easier to reason about. Async is super helpful to avoid overhead of thousands of threads, but makes just about everything else harder.
◧◩◪
3. bryanl+I9[view] [source] 2024-01-23 12:50:29
>>baq+88
I disagree. I've got several programs with a async select based main loop and others with threads, and the former are easier to reason about in my opinion. Threads hide effects.

However, Tokio tries to be the best of both threads and async and sometimes ends up being the worst of both when Sync/Send/etc creep into function signatures.

[go to top]