Skip to content

Simplify thunks and remove continuations - #185

Merged
chklauser merged 1 commit into
mainfrom
agent/simplify-thunks
Jul 24, 2026
Merged

Simplify thunks and remove continuations#185
chklauser merged 1 commit into
mainfrom
agent/simplify-thunks

Conversation

@chklauser

Copy link
Copy Markdown
Owner

Summary

  • remove the unused Continuation runtime type
  • replace the cooperative thunk trampoline with Lazy<PValue> using ExecutionAndPublication
  • preserve thunk, asthunk, and force, including nested-thunk forcing
  • cache both successful results and exceptions with .NET Lazy semantics
  • remove CooperativeContext and its dedicated FunctionContext escape hatch
  • update the runtime overview and add memoization regression tests

Validation

  • dotnet test --no-restore --tl:off --filter 'FullyQualifiedName~ThunkTests' (24 passed)
  • dotnet test --no-restore --tl:off (1,441 total; 1,438 passed; 3 skipped)
  • dotnet csharpier check .

@chklauser
chklauser marked this pull request as ready for review July 24, 2026 22:14
@chklauser
chklauser merged commit c4d064f into main Jul 24, 2026
2 checks passed
@chklauser
chklauser deleted the agent/simplify-thunks branch July 24, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant