|
Re: Swing on top of Flash
|
Posted: Feb 15, 2007 4:23 AM
|
|
> Also about multithreading, can somebody shortly explain me > how Flex handles the case in which the user presses a > button, a remote invocation to the server must be > performed and it can take seconds, and the whole GUI > doesn't get blocked? Thanks.
Usually, asynchronous networking using event handlers is used in this case. The GUI event loop listens for network events (connection made, incoming data, socket ready for send, etc..) as well as GUI events and processes both as they come in. This is very elegant as it allows keeping open a lot of connections without having a thread that sleeps most of it's lifetime for each.
Of course, for the real background crunching work you'd still like multi threading, but for clients and GUI interfaces it's hardly useful to have multiple threads.
|
|