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:13:56 +0100 [thread overview]
Message-ID: <9d3ec8300603010113t608db113x3c5bc06477c3111a@mail.gmail.com> (raw)
In-Reply-To: <4403A889.9070708@mcmaster.ca>
Can your code be used for undelimited continuation? I am currently
using code that looks somewhat like this:
open Netchannels
open Marshal
let suspend ()=
let oo=open_out "state"
and save_state k=
to_string k [Closures])
(* Skips a warning because this function does not return (it is an exit
point)*)
ignore(exit 0)
in
callcc save_state
(*
Saves the "state" the application is in as an base64 encoded marshalled
continuation.
*)
let _ =
if (Sys.file_exists "state") then
let res =
Sys.remove("state");
let k=Marshal.from_string res 0 in
throw k ()
next prev parent reply other threads:[~2006-03-01 9:13 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 ` Till Varoquaux [this message]
2006-03-01 9:26 ` [Caml-list] " Till Varoquaux
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=9d3ec8300603010113t608db113x3c5bc06477c3111a@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