Skip to main content
Deno.UnsafeCallback.prototype.ref - Deno documentation
method Deno.UnsafeCallback.prototype.ref
UnsafeCallback.prototype.ref(): number

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.

Return Type

number
Back to top