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:
parent
980d65b4d0
commit
a344368603
3 changed files with 16 additions and 18 deletions
14
cli/dts/lib.deno.ns.d.ts
vendored
14
cli/dts/lib.deno.ns.d.ts
vendored
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
16
cli/dts/lib.deno.unstable.d.ts
vendored
16
cli/dts/lib.deno.unstable.d.ts
vendored
|
@ -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.
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue