Hi Etienne, I just want to express my excitement about this new API! It looks like exactly what we need for WebAssembly compilation (and tier-up). We can probably remove quite a few hacks when switching to the Jobs API.
So thanks a lot for implementing this! I am not an API or platform expert, so I cannot help with the original question :/ Cheers, Clemens On Tue, Oct 8, 2019 at 7:32 PM 'Etienne Pierre-doray' via v8-dev < [email protected]> wrote: > 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 > <https://groups.google.com/d/msgid/v8-dev/CALoDvsboGKxjaYWfjcaEnu8U8XbRK_zi8auaTQ3y74-8L155%3Dg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- Clemens Backes (né Hammacher) Software Engineer [email protected] Google Germany GmbH Erika-Mann-Straße 33 80636 München Geschäftsführer: Paul Manicle, Halimah DeLaine Prado Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde. This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person. -- -- 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/CAGO%3DqhD0cxC94G-3ZQAsGTME_NqNSi1NuUUUgxC9b19jDsmtyg%40mail.gmail.com.
