Clicked 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.
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-wh...