krypton-io
krypton-io

Reputation: 713

multithreading and responsiveness of adobe air desktop

  1. how can i achieve multithreading in adobe air desktop for Linux?

my UI is sometimes unresponsive because of heavy computations (client/server sockets, sql updates and inserts). I want to have a thread processing these computation in the background and in Real-Time (UI should not be interrupted with modals/dialogs saying "loading")

  1. can a native process helps this kind of situation? i was googling for hours and i found this so-called "green threads" but it doesn't help me...

  2. does native process actually creates a new thread?

NOTE : this is for linux

sorry for my english..

Upvotes: 3

Views: 1997

Answers (2)

user2810061
user2810061

Reputation: 1

just look here https://code.google.com/p/async-threading/. AsyncThreading is an actionscript library to facilitate threading in Flex and Air applications.It is very simple, just extends AbstractAsyncThread class and implements IAsyncThreadResponder interface, or implement a class extending the IAsyncThreadResponder interface, you can do what you need.

But be carefull when you send a message to another thread, I suggest you get instance of your class but not to receive a message from it.

Upvotes: 0

Adrian Pirvulescu
Adrian Pirvulescu

Reputation: 4340

In your case I would give a try to Workers http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Worker.html

I would recommend that you use your main app for UI display and move all "heavy" work (webservice calls, parsers, utility classes) you have implemented so far in en external worker.

A nice tutorial you can find here http://gotoandlearn.com/play.php?id=162

Good luck

Upvotes: 1

Related Questions