module Async_gc: sig .. end
add_finalizer f x is like Gc.finalise f x, except that the finalizer is guaranteed
to run as an Async job (i.e. without interrupting other Async jobs). Unprotected use
of Gc.finalise in Async programs is wrong, because finalizers can run at any time
and in any thread.
include Core.Gc
val add_finalizer : ('a -> unit) -> 'a -> unit
add_finalizer f x is like Gc.finalise f x, except that the finalizer is guaranteed
to run as an Async job (i.e. without interrupting other Async jobs). Unprotected use
of Gc.finalise in Async programs is wrong, because finalizers can run at any time
and in any thread.
val finalise : [< `In_async__use_finalize_not_finalise ] ->
'a -> [> `In_async__use_finalize_not_finalise ]
finalise is rebound to avoid accidental use in Async programs.