Posts Tagged threading

ActionScript Workers: Sharing ByteArrays

Tags: , ,

ActionScript workers allow you to take advantage of today’s multi-core processors by creating multiple threads of execution. These threads will invariably need to share some data between them. By default, all data passed between the workers/threads is copied, which can be really slow. The ByteArray class can be shared without copying. Today’s article discusses this and talks about some quirks that come along with it.

Read the rest of this article »

9 Comments

Send ActionScript Worker Messages 6x Faster With Mutex

Tags: , ,

While ActionScript Workers made their debut in Flash Player 11.4, the Mutex class didn’t arrive until the next version: 11.5. This class is specifically designed to solve a subtle problem that cropped up in the last article. As you’ll see in this article, it does the job quite well! The result is even faster message passing between workers/threads, which is often key to efficiently using multiple core CPUs.

Read the rest of this article »

9 Comments

Send ActionScript Worker Messages 2.5x Faster

Tags: , , ,

We know that sending messages between ActionScript workers is slow, but how can we make it faster? Today’s article discusses an alternative approach to message passing that yields a 2.5x speedup. Read on to learn about the approach and un-block your workers.

Read the rest of this article »

13 Comments

ActionScript Workers Tutorial

Tags: ,

ActionScript workers add threading to AS3 so that you can take advantage of today’s multi-core CPUs. I’ve written a couple of articles about them so far, but skipped over the basics of actually setting them up and using them. This is surprisingly tricky! Read on for a crash course on how to use workers to speed up your app.

Read the rest of this article »

24 Comments

Easy Worker Communication With MessageComm

Tags: , , ,

ActionScript Workers are great, but they can be tricky to set up and especially debug. Today I’m introducing a couple of helper classes to take some of the pain out of communicating between threads. Read on for the helper class source code (MIT licensed) and an example app that uses it.

Read the rest of this article »

4 Comments

Pseudo Threads

Tags: , , ,

Eventually, Flash Player will support Worker Threads to take advantage of multi-core CPUs, but that may be quite a while from now. Today’s article shows you how you can get some concurrency right now by faking threads. Read on for the technique!

Read the rest of this article »

18 Comments