From: "Till Varoquaux" <till.varoquaux@gmail.com>
To: "Jacques Carette" <carette@mcmaster.ca>
Cc: caml-list@inria.fr, oleg@pobox.com
Subject: Re: [Caml-list] Native delimited continuations for bytecode OCaml
Date: Wed, 1 Mar 2006 10:26:38 +0100 [thread overview]
Message-ID: <9d3ec8300603010126q4086821cp976b082f1b2b7885@mail.gmail.com> (raw)
In-Reply-To: <9d3ec8300603010113t608db113x3c5bc06477c3111a@mail.gmail.com>
Oups, sorry the mail was sent while I was typing (someone accidentally
pressed enter...).
Can your code be used for unlimited continuation? I am currently
using code that looks somewhat like this:
let suspend ()=
and save_state k=
let oc=open_out_bin "state" in
Marshal.to_channel oc k [Marshal.Closures]);
close_out oc;
(* Skips a warning because this function does not return (it is an exit
point)*)
ignore(exit 0)
in
callcc save_state
(* If there is a resume point skip to it
*)
let _ =
if (Sys.file_exists "state") then
( let oi = open_in_bin "state" in
let k=Marshal.from_channel oi in
Sys.remove("state");
close_in oi;
throw k ());
[note]This code was simplified for sake of clarity and might have small errors.
I was wondering if something similar is possible with your library?
Regards,
Till Varoquaux
next prev parent reply other threads:[~2006-03-01 9:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-28 1:34 Jacques Carette
2006-03-01 9:13 ` [Caml-list] " Till Varoquaux
2006-03-01 9:26 ` Till Varoquaux [this message]
2006-03-01 11:37 ` oleg
2006-03-01 23:51 ` Jacques Garrigue
2006-03-03 1:20 ` oleg
2006-03-03 1:36 ` Till Varoquaux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9d3ec8300603010126q4086821cp976b082f1b2b7885@mail.gmail.com \
--to=till.varoquaux@gmail.com \
--cc=caml-list@inria.fr \
--cc=carette@mcmaster.ca \
--cc=oleg@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox