2 Replies Latest reply on Aug 21, 2007 7:32 AM by PawelJ

    Multi-threading in Flex Apps and blocked GUI


      Are there any multithreading mechanisms in Flex 2 applications?

      Let’s say I have quite large amount of data to process in background, does it mean, that the GUI of my app will be locked until the processing is finished?

      What can I do to improve GUI performance and responsiveness during background processing?

        • 1. Re: Multi-threading in Flex Apps and blocked GUI
          ntsiii Level 3


          One approach is to break long running scripts up into shorter sections. Have an "iterator" function that process item [n] through [n+100]. Have an instance variable flag that keeps track of "n". run the iterator for the first group of iterations. then using *callLater* call the iterator again.

          Using calllater permits the UI to redraw between runnings of the iterator. You will have to do this if youwanted to show a progress bar during the long operation. It would never update unless you stop execution of the process and restart with calllater.

          Finally, consider moving intense computations to the server.