List of usage examples for org.springframework.ide.eclipse.boot.util Thunk call
void call() throws Exception;
From source file:org.springframework.ide.eclipse.boot.dash.test.CloudFoundryClientTest.java
private Future<Void> doAsync(Thunk task) { CompletableFuture<Void> result = new CompletableFuture<>(); Job job = new Job("Async task") { protected IStatus run(IProgressMonitor monitor) { try { task.call(); result.complete(null);/*from www. j a va2 s .co m*/ } catch (Throwable e) { result.completeExceptionally(e); } return Status.OK_STATUS; } }; job.schedule(); return result; }