kont v0.1.3 — Unified marker pool and UnwindFrame #7
hayabusa-cloud
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Introduction
The
kontpackage implements delimited continuations and algebraic effects for Go 1.26+. It provides two computation representations:Cont[R, A](closure-based CPS) andExpr[A](defunctionalized frame chains evaluated by an iterative trampoline). Effect handlers use F-bounded polymorphism for compile-time dispatch. The stepping API (StepExpr,Suspension) enables external runtimes such as proactor event loops to drive computation one effect at a time.Usage
Downstream packages can use
UnwindFramefor allocation-free fused constructors:Highlights
Unified marker pool reduces Cont-path memory allocations.
UnwindFrameprovides a cache-line-sized (64 bytes on amd64) data-oriented frame with direct type-switch dispatch, enabling downstream fused constructors without closure allocation.What's Changed
Features
effectMarker,bindMarker,thenMarker,mapMarker) with a singlegenericMarkerbacked bysync.Pool, parameterized by static function pointers (feat: unified marker pool and UnwindFrame #6)UnwindFrame: data-oriented frame with 3 erased data fields + function pointer, dispatched via direct type-switch inevalFrames(feat: unified marker pool and UnwindFrame #6)AcquireUnwindFrame(): pool acquisition forUnwindFrame(feat: unified marker pool and UnwindFrame #6)Compatibility
This discussion was created from the release kont v0.1.3 — Unified marker pool and UnwindFrame.
Beta Was this translation helpful? Give feedback.
All reactions