If you would prefer the queue to be drained asynchronously, use the automatic finalization interface. For more details, see automatic-finalization-enabled?, page 55 and automatic-finalization-enabled?-setter, page 56.
Libraries that do not wish to depend on automatic finalization should not use those functions. They should call drain-finalization-queue synchronously at useful times, such as whenever they call finalize-when-unreachable.
Libraries that are not written to depend on automatic finalization should always behave correctly if they are used in an application that does use it.