It doesn't look like will executor will do what you want, since it has to
do with garbage collection rather than port closing.

This could be overkill, but it's possible to construct a custom port (
https://docs.racket-lang.org/reference/customport.html). Is it possible to
construct a new port that wraps your target port inside, and specify the
`close` argument to do whatever you want to do?

On Tue, Jun 30, 2020 at 3:37 PM David Storrs <[email protected]> wrote:

> I have a port that (my current theory says) is being closed when it
> shouldn't, but I'm having trouble isolating exactly where and when.  I
> thought maybe I could do something Rackety to say "as soon as this port
> gets closed, run this function".  I went digging through Wills and Plumbers
> but I'm having trouble grokking it.  Am I headed in the right direction, or
> is there a better way?
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAE8gKofeSmxqSs7RUL-PT0my-JcuW9atP2%2BDdj6o1o_hJVrsmw%40mail.gmail.com
> <https://groups.google.com/d/msgid/racket-users/CAE8gKofeSmxqSs7RUL-PT0my-JcuW9atP2%2BDdj6o1o_hJVrsmw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CADcuegueQkjYUq1NTcyEUv-XMhdAYrbh4o0PVtxqs9BEWOgUoA%40mail.gmail.com.

Reply via email to