Ok pero'... penso sia troppo complesso gestirlo cosi... anche perche' aggiorno molti gadged a fronte di svariate interfacce RPC in ingresso!!! in ogni caso il metodo done non riesco ad utilizzarlo.... ti faccio un esempio di come lavora il mio thread
codice:
RPC_Data Data dataRPC = null;
boolean setDisplayDetails = false;
public void setUpdateTable(RPC_Data arg1)
{
synchronized (updateTopLevel) {
dataRPC = arg1;
setDisplayDetails = true;
updateTopLevel.notifyAll();
}
}
/*
* doInBackground: This method work in background and update the data
* structure and the diplay.
*/
@Override
protected Object doInBackground()
{
synchronized (updateTopLevel) {
while (true) {
try {
updateTopLevel.wait();
}
catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//update the CCF Button
if( setDisplayDetails ) {
//operazioni grafiche e di aggiornamento
setDisplayDetails = false;
}
}
}