adobe-flash / crossbridge

Welcome to visit the homepage!
http://www.crossbridge.io
542 stars 194 forks source link

pthread support #3

Closed JMLX42 closed 11 years ago

JMLX42 commented 11 years ago

Hello,

great project! Open sourcing this is incredible and I hope you'll enjoy what the community will make out of it :)

Anyway, I read that starting at Flash 11.5 the x-compiler will support threading by binding pthreads. Is it working ?

As Flash has workers but no real threads, what are the limitations or does any pthread app. run properly when x-compiled?

Thank you for your help,

alexmac commented 11 years ago

Flash has traditional workers (no sharing of AS3 objects) but the contents of ByteArrays can be shared. couple that with some synchronization/CAS primitives (exposed in the flash.concurrent namespace) and Alchemy/FlasCC/Crossbridge fully support everything you can do with pthreads without any limitations or need to modify your code.

Take a look at the examples in the SDK to see some threading: http://www.adobe.com/devnet-docs/flascc/docs/samples.html