[racket-dev] Contract violation from custodian shutdown
It's hard to say where the bug is, but there may be some problem in the
implementation of custodians of `register-custodian-shutdown'. Is it
repeatable?
At Thu, 06 Dec 2012 16:48:37 -0700, Neil Toronto wrote:
> I just got this message on my console, I think after closing a tab,
> which coincided with DrRacket hanging:
>
>
> eventspace-shutdown?: contract violation
> expected: eventspace?
> given: #<procedure:mpfr_free_cache>
> context...:
> /home/neil/plt/collects/mred/private/wx/common/queue.rkt:201:0:
> shutdown-eventspace!
>
>
> It's obviously because of this code, which is near the top of
> "math/private/bigfloat/mpfr.rkt":
>
>
> (define mpfr-free-cache (get-mpfr-fun 'mpfr_free_cache (_fun -> _void)))
>
> (define mpfr-shutdown
> (register-custodian-shutdown mpfr-free-cache (λ (free) (free))))
>
>
> Did I misunderstand something, or is this someone else's bug?
>
> Neil ⊥
> _________________________
> Racket Developers list:
> http://lists.racket-lang.org/dev