I'm in a scenario where I have many I/O-bound tasks, nicely suited to run in background. However, I can't launch all of them in parallel.
Although I could use other tricks (eg. count semaphores), I wonder if I could change an already created std::async(deferred) (well, future, right now) policy to async
each time one of the futures completes (well, kind of, but I hope you get some context).
Once I have a deferred
future, the only way to start it is block until it ends (wait or get, not even wait_for). I'd just want to make it run, but without waiting for it to complete (right now; I will accept the block, but later).
Not the real thing, but this may do the trick in some scenarios:
deferred_f
is now gone, though. If anybody has any reference or pointer to it, it won't work.