feat: Solidify Concurrency Model for Inproc Workflows (#925)

* Disallow execution of multiple workflows at once
* Define notion of executor Reset() to allow reuse of workflows with shared executor instances
* Switch to delivering all messages to a single executor sequentially, with executors running in parallel
This commit is contained in:
Jacob Alber
2025-09-26 15:44:02 +00:00
committed by GitHub
parent eec7f192eb
commit 9614eea875
35 changed files with 773 additions and 369 deletions
@@ -103,6 +103,9 @@ public class InProcessStateTests
Run run = await InProcessExecution.RunAsync<TurnToken>(workflow, new());
run.Status.Should().Be(RunStatus.Idle);
writer.Completed.Should().BeTrue();
validator.Completed.Should().BeTrue();
}
[Fact]
@@ -129,8 +132,11 @@ public class InProcessStateTests
Checkpointed<Run> checkpointed = await InProcessExecution.RunAsync<TurnToken>(workflow, new(), CheckpointManager.Default);
checkpointed.Checkpoints.Should().HaveCount(6);
checkpointed.Checkpoints.Should().HaveCount(5);
checkpointed.Run.Status.Should().Be(RunStatus.Idle);
writer.Completed.Should().BeTrue();
validator.Completed.Should().BeTrue();
}
[Fact]