Class VirtualThreadTask<V>
java.lang.Object
dev.pfaff.altargui.async.VirtualThreadTask<V>
- All Implemented Interfaces:
Task<V>
,Task.Cancellable<V>
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.pfaff.altargui.async.Task
Task.Cancellable<V>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
boolean
isAlive()
join()
static VirtualThreadTask
<Void> spawnVirtualTask
(FallibleRunnable runnable) static <V> VirtualThreadTask
<V> spawnVirtualTask
(Callable<V> callable) thread()
-
Method Details
-
spawnVirtualTask
-
spawnVirtualTask
-
join
- Specified by:
join
in interfaceTask<V>
- Throws:
CompletionException
CancellationException
InterruptedException
-
joinUninterruptibly
- Specified by:
joinUninterruptibly
in interfaceTask<V>
- Throws:
CompletionException
CancellationException
-
cancel
public void cancel()- Specified by:
cancel
in interfaceTask.Cancellable<V>
-
isAlive
public boolean isAlive() -
thread
-