mirror of
https://github.com/tommyskeff/futur4j.git
synced 2026-01-18 07:16:45 +00:00
optimizations, more comfortable PromiseFactory api and support virtual threaded executors
This commit is contained in:
@@ -22,12 +22,16 @@ public class PromiseCompletion<T> {
|
||||
this.result = null;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return exception == null;
|
||||
}
|
||||
|
||||
public boolean isError() {
|
||||
return getException() != null;
|
||||
return exception != null;
|
||||
}
|
||||
|
||||
public boolean wasCanceled() {
|
||||
return getException() instanceof CancellationException;
|
||||
return exception instanceof CancellationException;
|
||||
}
|
||||
|
||||
public @Nullable T getResult() {
|
||||
|
||||
Reference in New Issue
Block a user