Download Accelerator – Async Rust Edition
ochagavia.nl
ochagavia.nl
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...
You can create 50 kernel threads in a millisecond. I doubt the user is going to notice the difference in implementation.