javascript - Are WinJS/Metro Apps single threaded? -


i read in windows 8 development tutorial metro apps written using html/javascript runs on single thread. if so, how executes asynchronous functions in winrt?

yes, javascript engine indeed single-threaded. calls api native code though , such can - , - open separate threads.

see this msdn article thorough explanation of underlying mechanics recommendations on how deal in code. winjs promise internally uses setimmediate allow rendering , message loop take on between multiple javascript functions , - important side-effect - shorten callstack.


Comments