4 ms·
> How does this work? Does the runtime tracks duration for each future? There's a watchdog. It's similar to the sysmon thread used in go: https://utcc.utoronto
by Argorak 7y ago
> How does this work? Does the runtime tracks duration for each future?
There's a watchdog. It's similar to the sysmon thread used in go: https://utcc.utoronto.ca/~cks/space/blog/programming/GoSchedulerAndSyscalls https://utcc.utoronto.ca/~cks/space/blog/programming/GoSched...
> I would imagine that the future object will be moved. And for move to be cheap are they allocated on heap by the runtime?
The trick is to steal the runtime on the thread, not the task being executed, which makes the process constant time ;).