Skip to content

Instantly share code, notes, and snippets.

@yogonza524
Created November 1, 2016 14:35
Show Gist options
  • Save yogonza524/7552d8be3228283b5b83bdad62626d90 to your computer and use it in GitHub Desktop.
Save yogonza524/7552d8be3228283b5b83bdad62626d90 to your computer and use it in GitHub Desktop.
private void taskOperation(){
Task<Void> task = new Task<Void>() {
@Override protected Void call() throws Exception {
return null;
}
};
task.setOnSucceeded((WorkerStateEvent event) -> {
//Do some callback action
});
Thread th = new Thread(task);
th.start();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment