final Task<?> timeoutTask = Task.action("timeout", () -> {
if (committed.compareAndSet(false, true)) {
result.fail(Exceptions.timeoutException(taskName));
}
} );
<BUG>timeoutTask.setPriority(Priority.MAX_PRIORITY);
ctx.createTimer(time, unit, timeoutTask);</BUG>
that.addListener(p -> {
if (committed.compareAndSet(false, true)) {
Promises.propagateResult(that, result);

final Task<?> timeoutTask = Task.action("timeout", () -> {
if (committed.compareAndSet(false, true)) {
result.fail(Exceptions.timeoutException(taskName));
}
} );
timeoutTask.setPriority(Priority.MAX_PRIORITY);
timeoutTask.getShallowTraceBuilder().setTaskType(TaskType.TIMEOUT.getName());
ctx.createTimer(time, unit, timeoutTask);
that.addListener(p -> {
if (committed.compareAndSet(false, true)) {
Promises.propagateResult(that, result);
