AsyncThreading 2.1 released

based on some feedback from one of the AsyncThreading users, i realized that the thread messaging system was broken in certain situations. while i had the code open, i took advantage of the opportunity and did a little bit of performance tuning with the Flex profiler. the main performance issue was high instantiation count on some member variables in the guts of the library – this has been resolved.

also, while i was fixing the messaging code, i realized that a thread could have multiple messages of the same type queued up before its next execution cycle. oops. the code is now updated so that a thread only tracks the newest instance of a message for a given message type per execution cycle.

for instance:
thread a is running on every frame, and thread b is running on every 8th frame. thread a sends a message of ‘hello’ on every execution. by the time thread b executes, its respondToHello() method is invoked 8 times because there are 8 messages of type ‘hello’ sitting in its inbox queue. now, with the updates i mentioned earlier, thread b only invokes respondToHello() once per execution cycle, because it is only keeping a reference to the newest ‘hello’ message that has been sent through the system.

i hope this works out – please ping me if it breaks your code:

anyways, the newest version of the lib can be downloaded from here:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s