Class IsThreadSpawningCall

java.lang.Object
org.ek9lang.compiler.support.IsThreadSpawningCall
All Implemented Interfaces:
Predicate<CallSymbol>

public final class IsThreadSpawningCall extends Object implements Predicate<CallSymbol>
Predicate that returns true iff the call's resolved target is a stdlib method which invokes its function/handler argument on a different thread than the caller. The recognised sites are:
  • TCP.accept(handler) — TCP server accept loop runs the handler per-connection
  • TCP.acceptUntilComplete(handler, readyHandler) — the handler per connection, and the ready handler on its own thread while the caller serves
  • HTTP.serveUntilComplete(readyHandler) — the ready handler on its own thread while the caller serves (a service's operations are concurrent entry points through their declaration)
  • Signals.register(...) — signal dispatcher invokes the handler from the dispatch thread

Used by the slice-1 CONCURRENT_ENTRY_POINT marker — the function passed as argument to such a call gets marked so the phase-5 data-race check (E08251) knows to walk its body. It asks a different question from the IR's StartsAndStopsRuntimeThreads (which calls have stopped every thread they started when they finish).

  • Constructor Details

    • IsThreadSpawningCall

      public IsThreadSpawningCall(ISymbol ek9Tcp, ISymbol ek9Signals, ISymbol ek9Http)
  • Method Details

    • test

      public boolean test(CallSymbol callSymbol)
      Specified by:
      test in interface Predicate<CallSymbol>
    • callNames

      public Set<String> callNames()
      Every call this recognises, as type.method with the type fully qualified - for the drift test holding it to the IR's HandsValuesToRuntimeThreads, which must publish exactly what these hand to other threads.
    • handlerTypes

      public List<IFunctionSymbol> handlerTypes()
      The function types these calls hand to another thread: every function-typed parameter of each of them (TCPHandler, TCPReadyHandler, TCPReadyObserver, HTTPReadyHandler, SignalHandler). A value of one of these types may reach such a call by any route - a parameter, a field, a call result - so every implementation of one is a concurrent entry point (review 2026-11-02, H2).
    • signalHandlerTypes

      public List<IFunctionSymbol> signalHandlerTypes()
      The function types Signals.register takes (SignalHandler): a value of one runs on the signal dispatcher, which never stops - so the program's own thread runs beside it for the rest of the program.