dhil / ocaml-multicont Goto Github PK
View Code? Open in Web Editor NEWmulti-shot continuations in OCaml
License: MIT License
multi-shot continuations in OCaml
License: MIT License
As a follow-up to the discussion at https://discuss.ocaml.org/t/multi-shot-continuations-gone-forever/9072/13, I think the usual resource-management issues inside resumptions apply to resumptions themselves: currently they have to be dropped manually, which prevents us from referring to them inside other resumptions since it becomes impossible to track when they should be freed.
As suggested in the discussion, one solution is to make resumptions purely GC-managed values. To do so, one can represent a resumption either as a heap value obtained by copying a fiber, or as a fiber which is only discontinued by the GC using a finaliser and which is never reinstated/converted back to a continuation. The interface gets simplified by removal of demote
, drop
and Resumption_already_dropped
.
The distinction between linear continuations, which are allowed to own resources, and multi-shot continuations, which are not, could be explained in the documentation, to underline the issues arising from promoting arbitrary continuations.
(cc @gasche)
In upstream, the module EffectHandlers
has been renamed to Effect
, c.f. ocaml/ocaml@f3f6ee0. The same change needs to be implemented in this library to restore compatibility.
I'm opening this just to track the issue started in kayceesrk/delimcc_of_fxhandler#1
According to @dra27 ocaml/ocaml#12735 could be the culprit
Currently the code makes some assumptions that are only true in native code mode.
This library should be packaged and released on https://github.com/ocaml-multicore/multicore-opam https://github.com/ocaml/opam-repository.
It would be nice to a minimal CI to test the examples both in native and bytecode modes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.