correct register-finalizer docs by clarifying prohibitions

This commit is contained in:
Matthew Flatt 2014-10-20 18:02:23 -05:00
parent 3323605fa9
commit c15422b577

View File

@ -328,8 +328,9 @@ See also @racket[register-custodian-shutdown].
The finalizer is invoked in a thread that is in charge of triggering The finalizer is invoked in a thread that is in charge of triggering
will executors for @racket[register-finalizer]. The given will executors for @racket[register-finalizer]. The given
@racket[finalizer] procedure should generally not rely on the @racket[finalizer] procedure should generally not rely on the
environment of the triggering thread, such as its output ports or environment of the triggering thread, and it must not use any
custodians, except that relying on a default logger is reasonable. parameters or call any parameter functions, except that relying on a
default logger and/or calling @racket[current-logger] is allowed.
Finalizers are mostly intended to be used with cpointer objects (for Finalizers are mostly intended to be used with cpointer objects (for
freeing unused memory that is not under GC control), but it can be freeing unused memory that is not under GC control), but it can be