Record Class CrossThreadEdge
java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase5.lockanalysis.CrossThreadEdge
- Record Components:
caller- the function/method that contains the thread-spawning call. Navigation target for "where the dispatch happens."handler- the function passed as the handler argument; runs on a different thread when the framework invokes it.callLocation- source token of the thread-spawning call expression (e.g. the.accept(handler)call site). Used byDeadlockChainto render theStepKind.CROSS_THREAD_BOUNDARYstep.
A synthetic call-graph edge representing thread-boundary-crossing dispatch
— passing a function as the handler argument to
TCP.accept,
Signals.register, or as a stage in cat ... | async.
The standard CallGraph captures
synchronous call relationships only: at a tcpServer.accept(handler)
site, the call graph records caller → TCP.accept. The framework's
subsequent invocation of handler on a different thread isn't a
synchronous call and isn't captured.
Phase C.1 walks the AST and identifies these dispatch sites, recording one
CrossThreadEdge per (caller, handler) pair. Phase C.2's
mayEnter composition consumes both the regular call graph and these
synthetic edges, classifying any path containing a cross-thread edge as
CROSS_THREAD per EK9_CONCURRENCY_MODEL.md §5.2.
-
Constructor Summary
ConstructorsConstructorDescriptionCrossThreadEdge(ISymbol caller, ISymbol handler, IToken callLocation) Creates an instance of aCrossThreadEdgerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncaller()Returns the value of thecallerrecord component.Returns the value of thecallLocationrecord component.final booleanIndicates whether some other object is "equal to" this one.handler()Returns the value of thehandlerrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CrossThreadEdge
Creates an instance of aCrossThreadEdgerecord class.- Parameters:
caller- the value for thecallerrecord componenthandler- the value for thehandlerrecord componentcallLocation- the value for thecallLocationrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
caller
-
handler
-
callLocation
Returns the value of thecallLocationrecord component.- Returns:
- the value of the
callLocationrecord component
-