Just scratching out the highlights
synchronized( myRunnable ) {
activity.runOnUiThread(myRunnable) ;
myRunnable.wait() ; // unlocks myRunable while waiting
}
Meanwhile... in myRunnable...
void run()
{
// do stuff
synchronized(this)
{
this.notify();
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…