2 ms·
Funny, I saw that same line and thought "oh yes, that is much cleaner". Well, it is a little goofy to have what looks like a function call in the middle of a ty
by jmillikin 3y ago
Funny, I saw that same line and thought "oh yes, that is much cleaner". Well, it is a little goofy to have what looks like a function call in the middle of a type signature, but the `Send + 'static` are simply what's needed if you want to use some sort of magical N:M thread pool in a language with TLS.
Honestly, a lot of the challenges people face with Rust async is because they're trying to use a really low-level primitive instead of just using normal threads. They come from a language like JavaScript or Python where async is the only option for concurrent I/O, and they don't realize that JS async is a completely different construct from Rust async. They'd be better off using threads.