Class MarkMethodsAsConcurrentEntryPoint

java.lang.Object
org.ek9lang.compiler.phase2.MarkMethodsAsConcurrentEntryPoint
All Implemented Interfaces:
Consumer<IAggregateSymbol>

final class MarkMethodsAsConcurrentEntryPoint extends Object implements Consumer<IAggregateSymbol>
Sets the CONCURRENT_ENTRY_POINT = "TRUE" squirrelled marker on every non-constructor, non-operator, concrete method of the supplied aggregate.

Used for genus that are inherently invoked from multiple threads:

  • Services (Step 6) — HTTP runtime invokes each operation per-request on a separate virtual/pooled thread.
  • Components (Step 6b) — DI singletons reachable from any concurrent entry point; their methods are racy by construction unless protected.

Marker scope is restricted to:

  • Methods directly defined on this aggregate (no inherited methods from Any).
  • Non-constructor methods (constructors run once at instantiation; the this-escape check E08250 already prevents observable mid-construction publication).
  • Non-operator methods (auto-generated operators like _eq, _hashcode are called by operations, not entry points themselves).

The phase-5 data-race check (E08251, Step 7) consumes the marker to know which method bodies to walk for shared-state mutations.

Part of EK9's compile-time data-race detection (slice 1, steps 6 and 6b).