You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optimize InternalTimerHandler disposed state handling
Motivation:
InternalTimerHandler used AtomicBoolean for disposal tracking, which adds an object allocation and extra indirection in a hot timer path.
Changes:
- Replaced the per-instance AtomicBoolean disposed field with a volatile boolean field.
- Added a static VarHandle for InternalTimerHandler.disposed and a disposedCAS helper to preserve atomic compare-and-set behavior where required.
- Kept periodic timer execution checks as volatile reads while retaining one-shot/cancel atomicity.
Results:
mvn -pl vertx-core -DskipTests compile passes.
0 commit comments