HTTPService multithreading?


what happens when this:

 

 

myhttpservice.send() //send 1 myhttpservice.send() //send 2   

 

 

are send 1 , send 2 executed @ same time (multithreading) or stacked , executed 1 @ time?

 

i have 10 objects share 1 httpservice instance, speed app if give each object different httpservice instance?

hidarikani wrote:

 

what happens when this:

 

 

myhttpservice.send() //send 1 myhttpservice.send() //send 2   

 

 

are send 1 , send 2 executed @ same time (multithreading) or stacked , executed 1 @ time?

 

i have 10 objects share 1 httpservice instance, speed app if give each object different httpservice instance?

 

as far i'm aware, they'll sent in sequential order, but result events won't in same order, depending on how long each of them take complete.

 

 

as far how should organise them, depends on data you're retriveing them. need have information readily returned 1 of them before send off service? or totally independant of each other?

 

you do

 

myhttpservice1.send()

myhttpservice2.send()

myhttpservice3.send()

etc..

 

all in same function if none of them rely on each other.

 

although, find messy , have adopted sending next service on result of previous one, example

 

private function init():void

{

     httpservice1.send()

}

 

private function httpservice1_result(event:resultevent):void

{

     httpservice2.send()

}

 

private function httpservice2_result(event:resultevent):void

{

     httpservice3.send()

}

 

etc...

 

it's far more organised, , keeps things happening expect. it'll abit slower however, requires each service complete before requesting next.

 

 

if you're looking save time, send them @ once. said, make sure, example, service #8 doesn't rely on #6 having been completed before it's sent.



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

Joomla site hacked, cant see front and - Joomla! Forum - community, help and support

Christian Home School Programs - Joomla! Forum - community, help and support

Trouble with PF_OutFlag_I_USE_AUDIO and PF_CHECKOUT_LAYER_AUDIO