Skip to content

Async.function/Async.procedure with a Kotlin method reference spawns a WorkflowThread per call instead of inlining, as it does the Java equivalent #2981

Description

@antmendoza

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

  • Version: 1.33.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions