Skip to main content
method Deno.UnsafeCallback.prototype.ref

Increments the callback's reference counting and returns the new reference count.

After ref() has been called, the callback always wakes up the Deno event loop when called from foreign threads.

If the callback's reference count is non-zero, it keeps Deno's process from exiting.