I'm not sure what you mean by "ignore the current running context and
interject with the c call"? All emscripten_set_main_loop does is something
equivalent to setInterval (but might use requestAnimationFrame or
setTimeout called multiple times). Those end up being event callbacks. You
can have other event callbacks and they all interleave on the browser's
main thread etc.

If the main() function runs for a while before exiting, then the main
thread is busy and the first callback for the main loop will be delayed.
The same is true for any iteration of the main loop, if it runs longer then
subsequent callbacks can only happen later, so they will be late.

- Alon



On Mon, Mar 10, 2014 at 3:08 PM, Trevor Linton <[email protected]>wrote:

> Worked perfectly, thanks!  Also, the compile speed up is huge.
>
> Off hand (and off topic), any knowledge of emscripten_async_call() runs a
> C function once the main loop thread begins? In the case of webkitjs the
> main loop at the end loops using emscripten_main_loop with a delay set to
> 60 fps, i'm noticing a large amount of the async calls are happening after
> the main loop begins;  I guess what i'm asking is does
> emscripten_async_call completely ignore the current running context and
> interject with the c call after X amount of milliseconds or X amount of
> milliseconds once the current javascript frame has completed?
>
> -t
>
>
> On Wednesday, March 5, 2014 3:35:48 PM UTC-6, Alon Zakai wrote:
>
>> This might be a limitation of the old compiler, hopefully it works in the
>> new one,
>>
>> https://github.com/kripken/emscripten/wiki/LLVM-Backend
>>
>> The old compiler is deprecated so unless there is a very serious need we
>> should focus on making sure things run ok in the newer one.
>>
>> - Alon
>>
>>
>>
>> On Wed, Mar 5, 2014 at 12:23 PM, Trevor Linton <[email protected]>wrote:
>>
>>> Specifically I seem to be getting this up in the build log that seems
>>> concerning:
>>>
>>> aborting from js compiler due to exception: unhandleable illegal icmp:
>>> ugt | undefined
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "emscripten-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to