4 ms·
Download Accelerator – Async Rust Edition
- deleted 2y ago[deleted]
- brink 2y agoI love async Rust, but no, you don't _need_ it to build something like this. You can create 50 kernel threads in a millisecond. I doubt the user is going to notice the difference in implementation.
- AndrewDucker 2y agoSee point 2 in the Background section.
- mnahkies 2y agoClicked on this as I've fond memories of download managers, though I was more interested in resuming downloads across many dial up sessions than throughput improvements. It's a good tip how they can apply to blob storage. Nit: As someone new to rust, I was a bit confused by the "clone the semaphore" part (as that would be a bit self defeating), but it turns out you're not actually cloning it. Rather the Arc wrapper is being cloned and managing access/lifetime of a single semaphore instance. There's a detailed explanation on stack overflow here that make it click for me https://stackoverflow.com/questions/40984932/what-happens-when-an-arc-is-cloned#40985661 https://stackoverflow.com/questions/40984932/what-happens-wh...