TL;DR: Jobs API <https://docs.google.com/document/d/15VnxSzaf2jXCyEiqJaeM5u1Rr6HoMuiI0qwUtuX2cOQ/edit> will be exposed publicly in base/task/post_job.h in this CL <https://chromium-review.googlesource.com/c/chromium/src/+/1829916>
The Jobs API is a power user API, mostly intended for v8, to be able to schedule a single base::RepeatingCallback and request that ThreadPool workers invoke it concurrently. This avoids degenerate cases which occur when many components post “num cores” tasks and the scheduler lacks context. The API also supports yield-semantics so user-visible job can use all cores but get out of the way when a user-blocking job comes in. ... and it's ready! However, I'm not sure how to go about exposing the API in v8::Platform. Similar to v8::TaskRunner, the straightforward solution is to replicate classes (JobHandle, JobDelegate) with virtual interfaces and further extend v8::Platform to expose PostJob(). This adds overhead however, especially for JobDelegate::ShouldYield() which should be called very often. I'd like to get input from v8 folks, and see if there are other solutions I haven't considered. -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CALoDvsboGKxjaYWfjcaEnu8U8XbRK_zi8auaTQ3y74-8L155%3Dg%40mail.gmail.com.
