feat: Stabilize Deno.Listener.ref/unref (#17477)

This commit is contained in:
Bartek Iwańczuk 2023-01-20 16:32:55 +01:00 committed by GitHub
parent c230a95551
commit da23f7f876
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 28 deletions

View file

@ -1082,23 +1082,6 @@ declare namespace Deno {
alpnProtocols?: string[];
}
/** @category Network */
export interface Listener extends AsyncIterable<Conn> {
/** **UNSTABLE**: New API, yet to be vetted.
*
* Make the listener block the event loop from finishing.
*
* Note: the listener blocks the event loop from finishing by default.
* This method is only meaningful after `.unref()` is called.
*/
ref(): void;
/** **UNSTABLE**: New API, yet to be vetted.
*
* Make the listener not block the event loop from finishing.
*/
unref(): void;
}
/** **UNSTABLE**: New API, yet to be vetted.
*
* Acquire an advisory file-system lock for the provided file.