setTimeout() and family

2 views
Skip to first unread message

Christoph Dorn

unread,
Sep 20, 2011, 4:25:17 PM9/20/11
to gp...@googlegroups.com
How do I get access to setTimeout() and family?

Christoph

Wes Garland

unread,
Sep 20, 2011, 5:09:23 PM9/20/11
to gp...@googlegroups.com
On 20 September 2011 16:25, Christoph Dorn <chri...@christophdorn.com> wrote:
How do I get access to setTimeout() and family?


There is no implementation -- these functions are provided by the reactor (event loop system) -- and we don't ship one with GPSEE.

What's your use case? I may have ideas.

--
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102

Christoph Dorn

unread,
Sep 20, 2011, 8:01:24 PM9/20/11
to gp...@googlegroups.com
Wes Garland
20 September, 2011 2:09 PM

How do I get access to setTimeout() and family?


There is no implementation -- these functions are provided by the reactor (event loop system) -- and we don't ship one with GPSEE.

What's your use case? I may have ideas.
I thought so after remembering an earlier comment from you.

I am short-circuiting it right now and that works.

I think the only use-case I have is to reset a deep stack which some engines don't like. I think firefox errors after about 25 levels.

The problem is the modules 2 declare chain [1].

If GPSEE has unlimited stack depth then we are all good.

Christoph

[1] - https://github.com/pinf/loader-js/blob/62eff626ed00734f874657f5ca83a7425bf43ed7/lib/pinf-loader-js/sandbox.js#L471-477

Wes Garland

unread,
Sep 20, 2011, 9:11:30 PM9/20/11
to gp...@googlegroups.com
> If GPSEE has unlimited stack depth then we are all good.

There are always limits. You have to consider both the C stack and JS stack with GPSEE -- but we try to be very liberal [and tunable] in that regard. If you bump into any limits, I would be very interested to see some sample code.

FWIW, I would expect performance to be similar to, or better than, Firefox (since we have more freedom to allocate).

Wes
compose-unknown-contact.jpg
Reply all
Reply to author
Forward
0 new messages