Re: [v8-users] v8::platform::PumpMessageLoop().

2018-12-24 Thread Xinyu Zuo
So what is `tasks` and when `tasks` would be posted to a worker thread? By my understanding, v8 self doesn't has an event loop, the event loop mechanism should be provided by upper level codes. Am I wrong? I'm a newbie to v8. 在 2015年10月13日星期二 UTC+8下午3:07:12,Jochen Eisinger写道: > > V8 posts

Re: [v8-users] v8::platform::PumpMessageLoop().

2015-10-14 Thread Jochen Eisinger
If you use phantom handles, the 2nd callback will be posted to the message loop. In the future, more tasks might get posted to it On Tue, Oct 13, 2015, 4:07 PM 'Aaron Link' via v8-users < v8-users@googlegroups.com> wrote: > On Tue, Oct 13, 2015 at 3:06 AM, Jochen Eisinger >

Re: [v8-users] v8::platform::PumpMessageLoop().

2015-10-14 Thread Jochen Eisinger
It should happen on whatever thread you use the isolate on. If you have an app that is more complex than hello world, I assume you already have some kind of message loop. In that case, I'd recommend to implement your own v8::Platform and just post to that message loop On Tue, Oct 13, 2015, 6:47

Re: [v8-users] v8::platform::PumpMessageLoop().

2015-10-13 Thread Jochen Eisinger
V8 posts certain tasks to the foreground message loop. If you don't implement one yourself and expose it via a custom v8::Platform, you'll have to pump the message loop of the default platform from time to time to execute those tasks. V8 also posts tasks to background threads - those threads will

Re: [v8-users] v8::platform::PumpMessageLoop().

2015-10-13 Thread 'Aaron Link' via v8-users
On Tue, Oct 13, 2015 at 3:06 AM, Jochen Eisinger wrote: > If you don't implement one yourself and expose it via a custom > v8::Platform, you'll have to pump the message loop of the default platform > from time to time to execute those tasks. > I never knew this (it's not

Re: [v8-users] v8::platform::PumpMessageLoop().

2015-10-13 Thread Jane Chen
So sounds like PumpMessageLoop can happen in the background after I return the result of a query, maybe even after I trigger garbage collection? On Tuesday, October 13, 2015 at 12:07:12 AM UTC-7, Jochen Eisinger wrote: > > V8 posts certain tasks to the foreground message loop. If you don't >

[v8-users] v8::platform::PumpMessageLoop().

2015-10-12 Thread Jane Chen
Looking at v8 4.7.0, both shell.cc and d8.cc calls: while (v8::platform::PumpMessageLoop(platform, isolate)) continue; after running a script. What's the purpose of this? As always, thanks in advance. -- -- v8-users mailing list v8-users@googlegroups.com