android multithreading and network on main thread exception;
<p>Consider the scenario where I have get data from server and post it to UI in say list view , but this is an going activity ,it never stops.</p>

<pre><code>taskA{ //fetches data over network

if(!update)
    fetch();//network operation

}

taskB{//using this data UI is updated at runtime just like feed.

if(update)
    show();//UI operation
}
</code></pre>

<p>taskA starts first after it completes taskB starts by that time A is sleeping and vice versa , goes , now the problems i am facing are:</p>

<ol>
<li>both operations have to be in worker thread</li>
<li>both operations are going in cycle till activity is alive.</li>
<li>if handler is used to post UI operation to the main thread , taskB seems to stop.</li>
</ol>

<p>Can anybody please suggest me a design to get this working?</p>
