3 ms·
the main problem is that there needs to be someone in charge of waking up your thread when it's ready, and also to run it. in your case you don't need the run p
by epilys 3y ago
the main problem is that there needs to be someone in charge of waking up your thread when it's ready, and also to run it. in your case you don't need the run part. But the waking part is tied to what the future is: a busy polling loop, a sleeping select, an io_uring; in fact it can be anything. You can manually make a future that returns immediately or sleeps forever. The rest of your code has no way to know these implementation details.