12345678910111213141516171819202122232425openCore_kernelincludeGc(** [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 [Caml.Gc.finalise] or [Core.Gc.add_finalizer] in Async programs is wrong, because
the finalizers won't hold the async lock, and thus could interleave arbitrarily with
async jobs. *)letadd_finalizerheap_blockf=Scheduler.(add_finalizer(t()))heap_blockfletadd_finalizer_exnheap_blockf=Scheduler.(add_finalizer_exn(t()))heap_blockfletadd_finalizer_lastheap_blockf=Scheduler.(add_finalizer_last(t()))heap_blockfletadd_finalizer_last_exnheap_blockf=Scheduler.(add_finalizer_last_exn(t()))heap_blockf;;moduleAlarm=structmoduleAlarm=Gc.Expert.Alarmtypet=Alarm.t[@@derivingsexp_of]letcreatef=Scheduler.(create_alarm(t()))fletdelete=Alarm.deleteend