update UI

in android platform, how to update UI in sub thread?
I access network in a sub thread, when receiving data, how to update the UI, how to notify the UI thread?

Share a data buffer of some kind between the threads. During every GUI loop check if there is data to be show and render it if possible.

Look at CCHttpRequest sources. AFAIK it inserts CCCallFunc callback through CCDirector.

Thank you very much, I consider this CCHttpRequest class is what I want.