Last active
December 15, 2015 20:59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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