Job scheduler devs, what do you think is the easiest way to implement job continuations? Store a pointer to a next-job in the job itself and push it to the current thread once the job finishes?
-
-
Vastauksena käyttäjälle @Manu343726
Pointer to next job and pushes job on to the job queue once it finishes is fine. I like to support “immediate” invoked continuations for some cases, but generally put the continuation on the queue. I use a single MPMC queue to facilitate this.
1 vastaus 0 uudelleentwiittausta 1 tykkäys -
Vastauksena käyttäjille @tloch14 ja @Manu343726
WRT immediate invoked. Useful when you are using continuations outside of your thread queue, like on a dedicated graphics thread, or an IO service thread. If this is never your concern, then it’s not worth worrying about.
1 vastaus 0 uudelleentwiittausta 1 tykkäys
Pointer to next task also easily expands to a pre-build DAG, where you have an array of pointers and each job has a dependency counter. Instead of always firing off the continuation, jobs decrement their continuations and invoke when 0.
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.