Reputation: 713
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")
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...
does native process actually creates a new thread?
NOTE : this is for linux
sorry for my english..
Upvotes: 3
Views: 1997
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
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