[racket] Serializable continuations

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Fri Jun 8 00:54:42 EDT 2012

On Thu, Jun 7, 2012 at 10:42 PM, Rodolfo Carvalho <rhcarvalho at gmail.com> wrote:
> Jay,
>
> On Fri, Jun 8, 2012 at 1:06 AM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
>>
>> If you write in
>>
>> #lang web-server/base
>>
>> then you will get serialization continuations, but none of the Web
>> libraries. The transformation isn't really Web-specific.
>>
>
>
> I could not use  #lang web-server/base on Racket v5.2.1 (Windows). #lang
> web-server works (probably bringing in more than the necessary).
> I've replaced "let/cc" and "let/ec" with
> "call-with-serializable-current-continuation", and now I am getting this
> error:
>
> current-continuation-marks: no corresponding prompt in the continuation:
> #<continuation-prompt-tag:web>
>
> I tried introducing uses of "call-with-continuation-prompt" and
> "(make-continuation-prompt-tag 'web)" out of luck. I don't really understand
> what the error means.

web-server/lang/abort-resume provides "call-with-web-prompt" that
allows you to call a thunk with the prompt (while not exposing the
prompt value)

>
> Can I use "serialize" from "racket/serialize" on continuations made with
> "call-with-serializable-current-continuation"?

Yes

Jay

>
>
> Thanks,
>
> Rodolfo Carvalho



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93


Posted on the users mailing list.