sig
  val finalise : ('-> unit Lwt.t) -> '-> unit
  val finalise_or_exit : ('-> unit Lwt.t) -> '-> unit
end