----- Original Message ----- 
From: "nevgeniev" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Thursday, September 21, 2006 12:26 PM
Subject: [flexcoders] is it possible to run background time consuming task 
in flex2?


>
> Hi,
>
> Flex2/ActionScript programming model is singlethreaded, but it has
> asynchronous IO calls. This means that obviously AVM has threads to
> implement asyncIO.
>
> I need to perform some time consuming computations within actionscript,
> but I can't spawn new thread in AS. Hence the questions:
>
> 1. can I somehow implement local service which will receive requests and
> post responses (events) to consume in GUI (event dispatch thread)? I
> mean reuse asynchronous IO implementation.
>
> 2. back in windows 3.xx days (single threaded os) there was "nested
> event loop" approach so within computation loop I can call something
> like dispatchMessages() to prevent UI from lockup. Is it possible with
> flex?

Not that I know of. You might be able to kludge it using a timer to re-enter 
a routine to do some computation, then give up control, etc. It would 
probably seriously compromise the responsiveness of your application.

That kind of process is better suited to the server, where you could get 
back the results on completion.

Paul 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to