Expected Behavior
A Kotlin method reference to a stub is inlined like the Java equivalent, and shouldn't consume a workflow thread per call.
Actual Behavior
When a workflow uses Async.function / Async.procedure with a Kotlin method reference to an
activity (or child workflow) stub, the SDK does not run the call inline. It spawns one
WorkflowThread per call. A wide fan-out therefore holds one workflow-pool thread per in-flight
activity
The equivalent Java code is inlined and uses a single workflow thread.
Steps to Reproduce the Problem
see the attached code
code.zip
Specifications
Expected Behavior
A Kotlin method reference to a stub is inlined like the Java equivalent, and shouldn't consume a workflow thread per call.
Actual Behavior
When a workflow uses
Async.function/Async.procedurewith a Kotlin method reference to anactivity (or child workflow) stub, the SDK does not run the call inline. It spawns one
WorkflowThreadper call. A wide fan-out therefore holds one workflow-pool thread per in-flightactivity
The equivalent Java code is inlined and uses a single workflow thread.
Steps to Reproduce the Problem
see the attached code
code.zip
Specifications