temporalio/sdk-dotnet

[Bug] WaitConditionAsync is run outside of Workflow context

cretz opened this issue · 1 comments

Describe the bug

The callback for WaitConditionAsync is run outside of the event loop, so the current task scheduler is not the workflow instance. This means any calls on the Workflow object within the callback will fail.

Workflow event loop is in the following file (for future reference)

private void RunOnce(bool checkConditions)