Caught

private class Caught(thread: Thread, val trace: Array<StackTraceElement>)

Where the watchdog found a lane thread standing when it spent that lane's budget. ScriptTimeoutError is an immutable process-wide singleton carrying no stack of its own, so this is the side channel a timeout report reads instead — and it is the better answer anyway: the offending code, not wherever the inlined guard next happened to fire. One immutable pair behind one volatile, so caughtHere reads thread and trace coherently. A materialized trace holds only strings, so retaining it pins no snippet classloader.

The thread is weak: from JDK 19 a dead Thread keeps its Runnable — for the integrated server, the whole server. caughtOn only ever matches a running caller, and a running caller keeps its own Thread reachable.

Constructors

Link copied to clipboard
constructor(thread: Thread, trace: Array<StackTraceElement>)

Properties

Link copied to clipboard
private val thread: WeakReference<Thread?>
Link copied to clipboard

Functions

Link copied to clipboard