闪存并行编程闪存

2023-09-09 21:33:16 作者:8岁就超神ㄩ

由于Flash不支持线程,它是如何设法对付多个动画?难道只有在内部Flash使用线程,但它不能访问的程序员?

Since Flash doesn't support thread, how does it manage to deal with multiple animations ? Is it only internally that Flash uses threads but which are not accessible to the programmer ?

您如何在原理可以实现在闪存喜欢这里什么是描述并行任务: http://books.google.fr/books?id=1OJ8EhvuPXAC&pg=PA352&lpg=PA352&dq=FLASH+PARALLEL+TASK&source=bl&ots=iTQIolYXCy&sig=edGCy1YYAZYJfxAMhrfUBkiggwo&hl=en&ei=94WgTfGWCMmxhAfgkNGQBQ&sa=X&oi=book_result&ct=result&resnum=1&ved=0CBQQ6AEwAA#v=onepage&q=FLASH%20PARALLEL%20TASK&f=false

How on the principle can you implement parallel tasks in flash like what's described here: http://books.google.fr/books?id=1OJ8EhvuPXAC&pg=PA352&lpg=PA352&dq=FLASH+PARALLEL+TASK&source=bl&ots=iTQIolYXCy&sig=edGCy1YYAZYJfxAMhrfUBkiggwo&hl=en&ei=94WgTfGWCMmxhAfgkNGQBQ&sa=X&oi=book_result&ct=result&resnum=1&ved=0CBQQ6AEwAA#v=onepage&q=FLASH%20PARALLEL%20TASK&f=false

推荐答案

线程,不支持在ActionScript 3的语言。然而,你可以实现一种伪线程的许多共同或处理密集型应用。见理论+演示和源的以下文章:

Threading is not supported in the actionscript 3 language. However you can achieve a type of pseudo-threading for many common or process-intensive applications. See the following articles for theory + demos and source:

http://www.senocular.com/flash/tutorials/asyncoperations/

http://blog.claudiu-ursica.ro/tag/pseudothreads/

至于天气或不闪光的VM是多线程,答案是排序的,。基本上你在ActionScript 3做的一切都在一个单独的线程除了Pixel Bender的过滤器,这是在自己的线程处理执行。此外,对于Flash Player的下一个主要版本,GPU的暴露这样的事情能/被推到GPU,以及使怎么说的因素,不能肯定。反正下面是一些参考资料:

As for weather or not the flash VM is multi-threaded, the answer is, sort-of. Basically everything you do in actionscript 3 is executed in a single thread EXCEPT for pixel bender filters, which are processed in their own thread. Also, for the next major release of flash player, the GPU is exposed so things can/are pushed to the GPU as well so how that factors in, not sure. Anyway below are some references:

http://en.wikipedia.org/wiki/Tamarin_(JavaScript_engine)

http://www.mozilla.org/projects/tamarin/faq.html

在接下来的环节注意,这个人是专门分配给项目开发带来多线程到flash虚拟机。

Notice in the next link, this person is assigned specifically to a project in development to bring multithreading to the flash VM.

http://www.adobe.com/technology/people/sanfrancisco/wilkinson.html

***更新***

在考虑到我对在它​​自己的线程Pixel Bender的运行语句,人们使用,因为这个原因的Pixel Bender的数字运算:

In regard to my statement about pixel bender running in it's own thread, people use pixel bender for number crunching because of this very reason:

http://www.adobe.com/devnet/flex/articles/flashbuilder4_pixelbender.html

全忘了,想通它需要添加在这里。

Forgot all about it, figured it needed to be added here.