synchronized (this) { while (!mHasResult) { try { wait(); } catch (InterruptedException e) { } } } return mResult;
synchronized (this) { mHasResult = true; mResult = res; notifyAll(); }