1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 00:29:09 -05:00

feat: Stabilize Deno.refTimer() and Deno.unrefTimer() APIs (#16036)

This commit is contained in:
Bartek Iwańczuk 2022-09-27 22:11:11 +02:00 committed by GitHub
parent 980d65b4d0
commit a344368603
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 18 deletions

View file

@ -3560,4 +3560,18 @@ declare namespace Deno {
| SRVRecord[] | SRVRecord[]
| string[][] | string[][]
>; >;
/**
* Make the timer of the given `id` block the event loop from finishing.
*
* @category Timers
*/
export function refTimer(id: number): void;
/**
* Make the timer of the given `id` not block the event loop from finishing.
*
* @category Timers
*/
export function unrefTimer(id: number): void;
} }

View file

@ -1381,22 +1381,6 @@ declare namespace Deno {
*/ */
export function funlockSync(rid: number): void; export function funlockSync(rid: number): void;
/** **UNSTABLE**: New API, yet to be vetted.
*
* Make the timer of the given id blocking the event loop from finishing.
*
* @category Timers
*/
export function refTimer(id: number): void;
/** **UNSTABLE**: New API, yet to be vetted.
*
* Make the timer of the given id not blocking the event loop from finishing.
*
* @category Timers
*/
export function unrefTimer(id: number): void;
/** **UNSTABLE**: New API, yet to be vetted. /** **UNSTABLE**: New API, yet to be vetted.
* *
* A handler for HTTP requests. Consumes a request and returns a response. * A handler for HTTP requests. Consumes a request and returns a response.

View file

@ -112,6 +112,8 @@
kill: __bootstrap.process.kill, kill: __bootstrap.process.kill,
addSignalListener: __bootstrap.signals.addSignalListener, addSignalListener: __bootstrap.signals.addSignalListener,
removeSignalListener: __bootstrap.signals.removeSignalListener, removeSignalListener: __bootstrap.signals.removeSignalListener,
refTimer: __bootstrap.timers.refTimer,
unrefTimer: __bootstrap.timers.unrefTimer,
}; };
__bootstrap.denoNsUnstable = { __bootstrap.denoNsUnstable = {
@ -146,8 +148,6 @@
flockSync: __bootstrap.fs.flockSync, flockSync: __bootstrap.fs.flockSync,
funlock: __bootstrap.fs.funlock, funlock: __bootstrap.fs.funlock,
funlockSync: __bootstrap.fs.funlockSync, funlockSync: __bootstrap.fs.funlockSync,
refTimer: __bootstrap.timers.refTimer,
unrefTimer: __bootstrap.timers.unrefTimer,
Child: __bootstrap.spawn.Child, Child: __bootstrap.spawn.Child,
spawnChild: __bootstrap.spawn.spawnChild, spawnChild: __bootstrap.spawn.spawnChild,
spawn: __bootstrap.spawn.spawn, spawn: __bootstrap.spawn.spawn,