ayojs / ayo

A fork of Node.js. Humans before technology.
Other
1.66k stars 97 forks source link

src: prepare v8 platform for multi-isolate support (workers preparation) #89

Closed addaleax closed 7 years ago

addaleax commented 7 years ago

This splits the task queue used for asynchronous tasks scheduled by V8 in per-isolate queues, so that multiple threads can be supported.

Checklist
Qard commented 7 years ago

I see a bunch of NodePlatform method signatures changing. Do you think it'd make sense to keep no-isolate versions of those which just iterate over all the isolates and call the isolate versions of those methods to reduce change impact on embedders?

addaleax commented 7 years ago

to reduce change impact on embedders?

@Qard I think that’s just FlushForegroundTasks() and DrainBackgroundTasks(), right? For those two that’s not going to be possible because they basically need to be called from the thread where JS is executing, i.e. the one that is currently responsible for a given Isolate

addaleax commented 7 years ago

@ayojs/core I’d appreciate some advice on how to make reviewing this easier – I realize this is a pretty niché topic within Node/V8…

addaleax commented 7 years ago

@TimothyGu @Qard Fixed review nits, please take another look if you can :)