On Tue, May 18, 2021 at 3:52 PM Sam Tobin-Hochstadt <sa...@cs.indiana.edu>
wrote:

> I think the key question is what you want to happen if you would need
> to re-run the "pre" thunk, because you re-enter the code via a
> continuation.
>
> In many cases, you don't want to support that at all …
>

Then you can use `call-with-continuation-barrier`, right?

(let* ([conn (connect-to-server)])
  (dynamic-wind
   void
   (λ ()
     (call-with-continuation-barrier
      (λ ()
        (send-message conn "hi"))))
   (λ ()
     (finalize-connection conn))))

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/0100017981191578-b5eaa465-de2a-4f1f-a4f1-d2976db88de0-000000%40email.amazonses.com.

Reply via email to