public final class SyncFutureWaiter extends Object implements Executor
Helper class that can wait for the result of some
future
, and do some work registered through the Executor
interface while waiting.
The purpose of this is to make execution of synchronous methods look more synchronous, e.g. stack traces should actually contain the caller.
Constructor and Description |
---|
SyncFutureWaiter() |
Modifier and Type | Method and Description |
---|---|
void |
execute(Runnable command) |
<R> R |
listenForResult(CompletionStage<R> stage) |
Copyright © 2016–2024. All rights reserved.