Skip to content

Instantly share code, notes, and snippets.

@nalitzis
Last active December 15, 2015 20:59
Show Gist options
  • Save nalitzis/5322243 to your computer and use it in GitHub Desktop.
Save nalitzis/5322243 to your computer and use it in GitHub Desktop.
synchMethod(){
// do something...
callAsycnMethod(callback);
synchronized(this){
try{
this.wait();
}catch(InterruptedException e){}
}
}
private class CallbackImpl implements Callback{
public void onComplete(){
synchronized(this){
this.notify();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment