Skip to content

Instantly share code, notes, and snippets.

@nalitzis
Last active December 15, 2015 20:59
synchMethod(){
// do something...
callAsycnMethod(callback);
//we want to stop here and wait for the callback before returning
}
private class CallbackImpl implements Callback{
public void onComplete(){
//this thread should signal the waiting thread that finally the execution is completed
//and synchMethod() can return
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment