Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A6ED69D56 for ; Sun, 25 Mar 2012 02:49:03 +0000 (UTC) Received: (qmail 74614 invoked by uid 500); 25 Mar 2012 02:49:03 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 74435 invoked by uid 500); 25 Mar 2012 02:49:03 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 74416 invoked by uid 99); 25 Mar 2012 02:49:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Mar 2012 02:49:02 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [80.237.132.80] (HELO wp073.webpack.hosteurope.de) (80.237.132.80) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Mar 2012 02:48:54 +0000 Received: from pd95c27.osaknt01.ap.so-net.ne.jp ([111.217.92.39] helo=[192.168.1.21]); authenticated by wp073.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1SBdVP-0003FZ-Tl; Sun, 25 Mar 2012 04:48:32 +0200 Message-ID: <4F6E8777.4020108@leichtgewicht.at> Date: Sun, 25 Mar 2012 11:48:23 +0900 From: Martin Heidegger User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: flex-dev@incubator.apache.org Subject: Re: Actionscript workers and async locking? References: <4F6BB7E0.3030202@thedevprocess.com> <4F6E1578.8070606@thedevprocess.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;mh@leichtgewicht.at;1332643734;85a9355f; X-Virus-Checked: Checked by ClamAV on apache.org After having a deeper look at as3commons-async I think it is pretty unmature, however: I actually quite like the new threading API that uses promises. Imagine: var serial: Async = new Async(); serial. .next( thread.doSomething() ) // passes the Promise from "thread.doSomething" to the chain and waits for the execution .error( handleErrorOfTheThread ) // handles a error message from the former thread result .next( loadFile("myAwesomeFile") ) // instantiates a url loading process and creates a Promise that it will return the File... .error( Async.INTERRUPT ) // Any error that happens here causes to interrupt the staple execution .handle( createGUI ) // gets the File passed on success and instantiates a class .next( animate( gui, {x: 200} ); // lets the gui slide in (also creates the promise that its there .revert( animate( gui, {x: -100} ); // to be called if the "Async" task was canceled for some reason .next( guiDone ); If all those methods would return "Promises" (Yeah, I will pass that file some day) then Threads could be easily integrated with other async calls. wouldn't that be cool ?! ;) yours Martin.