Skip to main content
Participating Frequently
June 7, 2013
Question

Multiple NativeWindows to Promote Concurrency?

  • June 7, 2013
  • 1 reply
  • 328 views

Hi,

I'm working on a desktop HTML app, and have begun to try and figure out workers in that environment.  Barring workers, I wonder about running seperate native windows. 

Does each native window execute within the same "event loop" as the main native window?  In other words, can I acheive similar concurency properties to workers by segmenting out lengthy processes into seperate native windows?

Thanks,

Mike

This topic has been closed for replies.

1 reply

Participating Frequently
June 8, 2013

I'm still trying to figure this out for sure, and have put together a little test.  With Process Explorer running I did two things:

1) Created two root windows with air.HTMLLoader.createRootWindow, and ran an expensive javascript function in each window seperately.

2) Create a AS3 based worker that is loaded into the root window.  The worker when started runs an expensive process.

On #1, running the expensive JS in the second window, PE showed all the CPU being eaten within the ADL thread.  Both my windows became unresponsive.

On #2, running the expensive worker, PE showed two seperate ADL threads chewing through the CPU.  My main window stayed responsive.

I guess that is my answer then.  Or did I miss something?

Mike