Vert.x Future timeout fails without cancelling the source operation
0 reputation · 27 Feb 2026, 18:54 UTC
Vert.x Future timeout does not cancel the source asynchronous operation
This question concerns whether applying Future.timeout in Vert.x 4.x automatically cancels the source future or the underlying task it represents. The goal is to avoid resource leaks when a timed-out operation leaves timers, Netty channels, or other long-running work active.
Available notes suggest the timeout future fails independently and cancellation only reaches constituents that implement Cancellable. It is unclear whether this applies uniformly to plain futures created from promises, or whether version differences between Vert.x 3.x and 4.x change the expectation.
Does Future.timeout invoke cancel on the source future? Must a failure handler manually cancel the source work? Does the behavior differ for composite futures such as Future.all?