Threading Problems in ActionScript 2.0?

Posted by yar on Stack Overflow See other posts from Stack Overflow or by yar
Published on 2010-04-06T10:20:21Z Indexed on 2010/04/06 10:23 UTC
Read the original article Hit count: 214

Is it possible to have concurrency problems (thread competition) in an onEnterFrame method in ActionScript 2.0?

I have written this cheesy code as a guard:

if (!busy) { // I suspect some threading problems: is that even possible in flash
    busy = true;
    movePanels();
    busy = false;
}

but this is no assurance against thread competition. If so, how can I do a basic semaphore/lock?

Note: I suspect threading problems in my app, but if they're impossible, I'll check my code differently.

© Stack Overflow or respective owner

Related posts about actionscript-2

Related posts about multithreading