[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-03-01 (09:13) |
From: | Till Varoquaux <till.varoquaux@g...> |
Subject: | Re: [Caml-list] Native delimited continuations for bytecode OCaml |
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 ()